Interface Equator<T>
- Type Parameters:
T- the types of object thisEquatorcan evaluate.
- All Known Implementing Classes:
DefaultEquator
public interface Equator<T>
An equation function, which determines equality between objects of type T.
It is the functional sibling of Comparator; Equator is to
Object as Comparator is to Comparable.
- Since:
- 4.0
-
Method Summary
-
Method Details
-
equate
-
hash
Calculates the hash for the object, based on the method of equality used in the equate method. This is used for classes that delegate theirequals(Object)method to an Equator (and so must also delegate theirhashCode()method), or for implementations ofHashedMapthat use an Equator for the key objects.- Parameters:
o- the object to calculate the hash for.- Returns:
- the hash of the object.
-