Package net.sf.saxon.expr.sort
Interface EqualityMatcher<T>
- Type Parameters:
T
- the type of objects to be compared for equality
- All Known Implementing Classes:
SimpleTypeComparison
,SimpleTypeIdentityComparison
public interface EqualityMatcher<T>
Interface representing objects used to perform equality matching. This is used in preference to wrapping
the objects in a wrapper with its own equals() and hashCode() methods, to avoid the overhead of wrapper
objects in a large data structure
-
Method Summary
-
Method Details
-
equal
Compare two objects for equality- Parameters:
a
- one objectb
- another object- Returns:
- true if the two objects are deemed equal
-
hash
Compute a hash code for an object- Parameters:
a
- an object- Returns:
- a hash code, which has the property that if two objects are equal, then they must have the same hash code
-