CoordTuple requires equals() method for use as Hashkey

This commit is contained in:
tmpillbox committed 2014-08-28 19:41:33 -05:00
1 parent 13dc682afd
commit c8cd17fb7e
1 file changed
+9
+9
View File
@@ -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 ()