mirror of
https://github.com/GTNewHorizons/Mantle.git
synced 2026-11-18 19:29:32 +00:00
CoordTuple requires equals() method for use as Hashkey
This commit is contained in:
1 parent
13dc682afd
commit
c8cd17fb7e
1 file changed
+9
@@ -26,6 +26,15 @@ public class CoordTuple implements Comparable
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean equals (Object obj) {
|
||||
if (!(obj instanceof CoordTuple)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
CoordTuple that = (CoordTuple)obj;
|
||||
return this.x == that.x && this.y == that.y && this.z == that.z;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode ()
|
||||
|
||||
Reference in new issue
Block a user