Class Equivalence.Identity

  • All Implemented Interfaces:
    java.io.Serializable
    Enclosing class:
    Equivalence<T>

    static final class Equivalence.Identity
    extends Equivalence<java.lang.Object>
    implements java.io.Serializable
    • Constructor Detail

      • Identity

        Identity()
    • Method Detail

      • doEquivalent

        protected boolean doEquivalent​(java.lang.Object a,
                                       java.lang.Object b)
        Description copied from class: Equivalence
        Returns true if a and b are considered equivalent.

        Called by Equivalence.equivalent(T, T). a and b are not the same object and are not nulls.

        Specified by:
        doEquivalent in class Equivalence<java.lang.Object>
      • doHash

        protected int doHash​(java.lang.Object o)
        Description copied from class: Equivalence
        Returns a hash code for non-null object t.

        Called by Equivalence.hash(T).

        Specified by:
        doHash in class Equivalence<java.lang.Object>
      • readResolve

        private java.lang.Object readResolve()