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().

        obj - The object.
        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).

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