Skip to content

Commit 85f202b

Browse files
gab1onectrueden
authored andcommitted
BytesLocation: add hashCode() and equals()
1 parent e78194a commit 85f202b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/main/java/org/scijava/io/location/BytesLocation.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,15 @@ public ByteBuffer getByteBuffer() {
6161
return bytes;
6262
}
6363

64+
// -- Object methods --
65+
66+
@Override
67+
public int hashCode() {
68+
return System.identityHashCode(this);
69+
}
70+
71+
@Override
72+
public boolean equals(final Object obj) {
73+
return obj == this;
74+
}
6475
}

0 commit comments

Comments
 (0)