public interface EqualityComparer<T>
Modifier and Type | Method and Description |
---|---|
boolean |
equals(T x,
T y)
Determines whether the specified objects are equal.
|
int |
hashCode(T obj)
Returns a hash code for the specified object.
|
boolean equals(T x, T y)
x
- The first object of type T to compare.y
- The second object of type T to compare.true
if the specified objects are equal; otherwise, false
.int hashCode(T obj)
obj
- The Object
for which a hash code is to be returned.