Class NativeEqualsChecker<T>

  • Type Parameters:
    T - the concrete type
    All Implemented Interfaces:
    EqualsChecker<T,​T>

    public final class NativeEqualsChecker<T>
    extends Object
    implements EqualsChecker<T,​T>
    Compare two objects by there native equals method.
    • Method Detail

      • getInstance

        public static <T> NativeEqualsChecker<T> getInstance()
        Return an instance for the correct type.
        Type Parameters:
        T - the concrete type
        Returns:
        the native equals checker
      • equals

        public boolean equals​(T objectT,
                              T objectK)
        Description copied from interface: EqualsChecker
        Calculate equality by specific attributes.
        Specified by:
        equals in interface EqualsChecker<T,​T>
        Parameters:
        objectT - the first object, of type T
        objectK - the other object, of type K
        Returns:
        true if the objects are equals by some specific attributes