Skip to content

Commit 67b2ef6

Browse files
author
Julian Kast
committed
Added comparing ButtonID in SoftButtonObject
1 parent 8642a76 commit 67b2ef6

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

base/src/main/java/com/smartdevicelink/managers/screen/SoftButtonObject.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,9 @@ public int hashCode() {
319319
int result = 1;
320320
result += ((getName() == null) ? 0 : Integer.rotateLeft(getName().hashCode(), 1));
321321
result += ((getCurrentStateName() == null) ? 0 : Integer.rotateLeft(getCurrentStateName().hashCode(), 2));
322+
result += Integer.rotateLeft(Integer.valueOf(getButtonId()).hashCode(), 3);
322323
for (int i = 0; i < this.states.size(); i++) {
323-
result += ((getStates().get(i) == null) ? 0 : Integer.rotateLeft(getStates().get(i).hashCode(), i + 2));
324+
result += ((getStates().get(i) == null) ? 0 : Integer.rotateLeft(getStates().get(i).hashCode(), i + 4));
324325
}
325326
return result;
326327
}

0 commit comments

Comments
 (0)