Interface UnaryEquator<T>
- Type Parameters:
T- Type of compared entity
- All Superinterfaces:
BiPredicate<T,T>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Checks equality between 2 entities of same type
-
Method Summary
Modifier and TypeMethodDescriptiondefault UnaryEquator<T> and(UnaryEquator<? super T> other) Returns a composed equator that represents a short-circuiting logical AND of this equator and another.static <T> UnaryEquator<T> comparing(Comparator<? super T> c) static <T> UnaryEquator<T> static <T> UnaryEquator<T> falsum()static <T> booleanisSameReference(T o1, T o2) default UnaryEquator<T> negate()default UnaryEquator<T> or(UnaryEquator<? super T> other) Returns a composed equator that represents a short-circuiting logical AND of this equator and another.static <T> UnaryEquator<T> static <T> UnaryEquator<T> verum()Methods inherited from interface java.util.function.BiPredicate
and, or, test
-
Method Details
-
and
Returns a composed equator that represents a short-circuiting logical AND of this equator and another. When evaluating the composed equator, if this equator isfalse, then theotherequator is not evaluated.- Parameters:
other- The other (nevernullequator- Returns:
- The compound equator
-
or
Returns a composed equator that represents a short-circuiting logical AND of this equator and another. When evaluating the composed equator, if this equator istrue, then theotherequator is not evaluated.- Parameters:
other- The other (nevernullequator- Returns:
- The compound equator
-
negate
- Specified by:
negatein interfaceBiPredicate<T,T> - Returns:
- an equator that represents the logical negation of this one
-
isSameReference
static <T> boolean isSameReference(T o1, T o2) -
defaultEquality
- Type Parameters:
T- Type of entity- Returns:
- The default equality checker
- See Also:
-
referenceEquality
- Type Parameters:
T- Type of entity- Returns:
- An equator that checks reference equality
- See Also:
-
comparing
- Type Parameters:
T- Type of entity- Parameters:
c- The (nevernull) comparator- Returns:
- The equivalent equator
-
verum
- Type Parameters:
T- Type of evaluated entity- Returns:
- A
UnaryEquatorthat returns alwaystrue - See Also:
-
falsum
- Type Parameters:
T- Type of evaluated entity- Returns:
- A
UnaryEquatorthat returns alwaysfalse - See Also:
-