Cleanup equals().

This commit is contained in:
Major-
2014-08-01 15:04:50 +01:00
parent 021467c92d
commit 7727e9a148
+4 -8
View File
@@ -62,18 +62,14 @@ public final class Position {
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (obj == null) { if (obj == null) {
return false; return false;
} } else if (this == obj) {
if (this == obj) {
return true; return true;
} } else if (getClass() != obj.getClass()) {
if (getClass() != obj.getClass()) {
return false; return false;
} }
Position other = (Position) obj; Position other = (Position) obj;
if (height != other.height || x != other.x || y != other.y) { return x == other.x && y == other.y && height == other.height;
return false;
}
return true;
} }
/** /**