fix for calculator history equals
This commit is contained in:
parent
5dcdec8020
commit
686169ec50
@ -51,4 +51,24 @@ public class CalculatorHistoryState extends AbstractHistoryState{
|
|||||||
", displayState=" + displayState +
|
", displayState=" + displayState +
|
||||||
'}';
|
'}';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) return true;
|
||||||
|
if (o == null || getClass() != o.getClass()) return false;
|
||||||
|
|
||||||
|
CalculatorHistoryState that = (CalculatorHistoryState) o;
|
||||||
|
|
||||||
|
if (!displayState.equals(that.displayState)) return false;
|
||||||
|
if (!editorState.equals(that.editorState)) return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
int result = editorState.hashCode();
|
||||||
|
result = 31 * result + displayState.hashCode();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user