Package com.google.common.base
Class Equivalence.Identity
- java.lang.Object
-
- com.google.common.base.Equivalence<java.lang.Object>
-
- com.google.common.base.Equivalence.Identity
-
- All Implemented Interfaces:
java.io.Serializable,java.util.function.BiPredicate<java.lang.Object,java.lang.Object>
- Enclosing class:
- Equivalence<T>
static final class Equivalence.Identity extends Equivalence<java.lang.Object> implements java.io.Serializable
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.common.base.Equivalence
Equivalence.Equals, Equivalence.Identity, Equivalence.Wrapper<T>
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static Equivalence.IdentityINSTANCEprivate static longserialVersionUID
-
Constructor Summary
Constructors Constructor Description Identity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleandoEquivalent(java.lang.Object a, java.lang.Object b)Implemented by the user to determine whetheraandbare considered equivalent, subject to the requirements specified inEquivalence.equivalent(T, T).protected intdoHash(java.lang.Object o)Implemented by the user to return a hash code fort, subject to the requirements specified inEquivalence.hash(T).private java.lang.ObjectreadResolve()-
Methods inherited from class com.google.common.base.Equivalence
equals, equivalent, equivalentTo, hash, identity, onResultOf, pairwise, test, wrap
-
-
-
-
Field Detail
-
INSTANCE
static final Equivalence.Identity INSTANCE
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Method Detail
-
doEquivalent
protected boolean doEquivalent(java.lang.Object a, java.lang.Object b)Description copied from class:EquivalenceImplemented by the user to determine whetheraandbare considered equivalent, subject to the requirements specified inEquivalence.equivalent(T, T).This method should not be called except by
Equivalence.equivalent(T, T). WhenEquivalence.equivalent(T, T)calls this method,aandbare guaranteed to be distinct, non-null instances.- Specified by:
doEquivalentin classEquivalence<java.lang.Object>
-
doHash
protected int doHash(java.lang.Object o)
Description copied from class:EquivalenceImplemented by the user to return a hash code fort, subject to the requirements specified inEquivalence.hash(T).This method should not be called except by
Equivalence.hash(T). WhenEquivalence.hash(T)calls this method,tis guaranteed to be non-null.- Specified by:
doHashin classEquivalence<java.lang.Object>
-
readResolve
private java.lang.Object readResolve()
-
-