Package com.google.common.base
Class Equivalence.Identity
- All Implemented Interfaces:
Serializable
,BiPredicate<Object,
Object>
- Enclosing class:
Equivalence<T>
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.common.base.Equivalence
Equivalence.Equals, Equivalence.Identity, Equivalence.Wrapper<T>
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final Equivalence.Identity
private static final long
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
doEquivalent
(Object a, Object b) Implemented by the user to determine whethera
andb
are considered equivalent, subject to the requirements specified inEquivalence.equivalent(T, T)
.protected int
Implemented by the user to return a hash code fort
, subject to the requirements specified inEquivalence.hash(T)
.private Object
Methods inherited from class com.google.common.base.Equivalence
equals, equivalent, equivalentTo, hash, identity, onResultOf, pairwise, test, wrap
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.function.BiPredicate
and, negate, or
-
Field Details
-
INSTANCE
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
-
Constructor Details
-
Identity
Identity()
-
-
Method Details
-
doEquivalent
Description copied from class:Equivalence
Implemented by the user to determine whethera
andb
are 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,a
andb
are guaranteed to be distinct, non-null instances.- Specified by:
doEquivalent
in classEquivalence<Object>
-
doHash
Description copied from class:Equivalence
Implemented 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,t
is guaranteed to be non-null.- Specified by:
doHash
in classEquivalence<Object>
-
readResolve
-