container
Interface EqualityTester
- public interface EqualityTester
Used to compare keys for equality, just as java.util.Comparator
compares them for order. A hash function should also be defined
so that equal keys get the same hash code.
An EqualityTester object might expect keys of a particular type.
Then its methods should throw a ClassCastException when given keys
of the wrong type.
|
Method Summary |
boolean |
equal(java.lang.Object a,
java.lang.Object b)
|
int |
hash(java.lang.Object a)
|
equal
public boolean equal(java.lang.Object a,
java.lang.Object b)
throws java.lang.ClassCastException
java.lang.ClassCastException
hash
public int hash(java.lang.Object a)
throws java.lang.ClassCastException
java.lang.ClassCastException