Class IdentityHashComparator<T>

  • All Implemented Interfaces:
    Comparator<T>, MIComparator<T>

    public class IdentityHashComparator<T>
    extends Object
    implements MIComparator<T>
    The IdentityHashComparator will use the hashcode of each objects to compare the objects.
    Since:
    14/11/13
    Version:
    $Id$
    Author:
    Marine Dumousseau (marine@ebi.ac.uk)
    • Constructor Detail

      • IdentityHashComparator

        public IdentityHashComparator()
    • Method Detail

      • compare

        public int compare​(T t,
                           T t2)
        Compares two objects based on their hashcode methods
        Specified by:
        compare in interface Comparator<T>
        Parameters:
        t - a T object.
        t2 - a T object.
        Returns:
        a int.
      • computeHashCode

        public int computeHashCode​(T object)

        computeHashCode

        Specified by:
        computeHashCode in interface MIComparator<T>
        Parameters:
        object - a T object.
        Returns:
        a int.