Package de.aristaflow.adept2.util
Class EqualityTools
- java.lang.Object
-
- de.aristaflow.adept2.util.EqualityTools
-
public class EqualityTools extends Object
Tool methods supporting implementation ofObject.equals(Object)
.
-
-
Constructor Summary
Constructors Constructor Description EqualityTools()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> boolean
equalsWithNull(Supplier<T> o1, Supplier<T> o2)
Gets whether the objects provided by the designated suppliers are either bothnull
or are equal with respect to equals of the first object.
-
-
-
Method Detail
-
equalsWithNull
public static <T> boolean equalsWithNull(Supplier<T> o1, Supplier<T> o2)
Gets whether the objects provided by the designated suppliers are either bothnull
or are equal with respect to equals of the first object.- Parameters:
o1
- The supplier for the first object. This supplier must not benull
(but it can supplynull
).o2
- The supplier for the second object. This supplier must not benull
(but it can supplynull
).- Returns:
- Whether the objects provided by the designated suppliers are either both
null
or equal.
-
-