Interface IEqualsImplementation<T>

  • Type Parameters:
    T - Type of objects to compare
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface IEqualsImplementation<T>
    Interface to implement for checking if two objects are identical. This interface is only used within the EqualsImplementationRegistry.
    Author:
    Philip Helger
    • Method Detail

      • areEqual

        boolean areEqual​(@Nonnull
                         T aObj1,
                         @Nonnull
                         T aObj2)
        Check if the passed two objects are identical or not.
        Parameters:
        aObj1 - First object. May not be null.
        aObj2 - Second object. May not be null.
        Returns:
        true if the passed objects are equals according to the specification of Object.class.
      • implementationEqualsOverridesInterface

        default boolean implementationEqualsOverridesInterface()
        Returns:
        true if this implementation is designed to work on an interface, but equals is called for an implementation of that interface and provides its own equal method.