Class EqualityTools

java.lang.Object
de.aristaflow.adept2.util.EqualityTools

public class EqualityTools extends Object
Tool methods supporting implementation of Object.equals(Object).
  • Constructor Details

    • EqualityTools

      public EqualityTools()
  • Method Details

    • equalsWithNull

      public static <T> boolean equalsWithNull(Supplier<T> o1, Supplier<T> o2)
      Gets whether the objects provided by the designated suppliers are either both null or are equal with respect to equals of the first object.
      Parameters:
      o1 - The supplier for the first object. This supplier must not be null (but it can supply null).
      o2 - The supplier for the second object. This supplier must not be null (but it can supply null).
      Returns:
      Whether the objects provided by the designated suppliers are either both null or equal.