Example usage for Java com.google.common.base Equivalence fields, constructors, methods, implement or subclass
The text is from its open source code.
Equivalence() Constructor for use by subclasses. |
Equivalence | equals() Returns an equivalence that delegates to Object#equals and Object#hashCode . |
boolean | equivalent(@Nullable T a, @Nullable T b) Returns true if the given objects are considered equivalent. |
Predicate | equivalentTo(@Nullable T target) Returns a predicate that evaluates to true if and only if the input is equivalent to target according to this equivalence relation. |
int | hash(@Nullable T t) Returns a hash code for t . |
int | hashCode() Returns a hash code value for the object. |
Equivalence | identity() Returns an equivalence that uses == to compare values and System#identityHashCode(Object) to compute the hash code. |
Wrapper | wrap(@Nullable S reference) Returns a wrapper of reference that implements Wrapper#equals(Object) Object.equals() such that wrap(a).equals(wrap(b)) if and only if equivalent(a, b) . |