Class ObjectEqualityComparator

    • Constructor Detail

      • ObjectEqualityComparator

        public ObjectEqualityComparator()
    • Method Detail

      • hashCode

        public int hashCode​(Object obj)
        This method returns a hash code for the specified object.

        This implementation returns obj.hashCode().

        Parameters:
        obj - The object.
        Returns:
        The hash code for obj.
      • equals

        public boolean equals​(Object a,
                              Object b)
        This method tests if two objects are equal.

        This implementation relies on object equality. If both objects are null, this method returns true. Otherwise if only a is null, this method returns false. Otherwise, this method returns the result of a.equals(b).

        Parameters:
        a - The first object to compare.
        b - The second object to compare.
        Returns:
        true if a equals b, otherwise false.