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.
@FunctionalInterface public interface UnaryEquator<T> extends BiPredicate<T,T>
Checks equality between 2 entities of same type- Author:
- Apache MINA SSHD Project
-
-
Method Summary
All Methods Static Methods Instance Methods Default Methods Modifier and Type Method Description default 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>defaultEquality()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>referenceEquality()static <T> UnaryEquator<T>verum()-
Methods inherited from interface java.util.function.BiPredicate
and, or, test
-
-
-
-
Method Detail
-
and
default UnaryEquator<T> and(UnaryEquator<? super T> other)
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
default UnaryEquator<T> or(UnaryEquator<? super T> other)
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
default UnaryEquator<T> 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
static <T> UnaryEquator<T> defaultEquality()
- Type Parameters:
T- Type of entity- Returns:
- The default equality checker
- See Also:
Objects.equals(Object, Object)
-
referenceEquality
static <T> UnaryEquator<T> referenceEquality()
- Type Parameters:
T- Type of entity- Returns:
- An equator that checks reference equality
- See Also:
isSameReference(Object, Object)
-
comparing
static <T> UnaryEquator<T> comparing(Comparator<? super T> c)
- Type Parameters:
T- Type of entity- Parameters:
c- The (nevernull) comparator- Returns:
- The equivalent equator
-
verum
static <T> UnaryEquator<T> verum()
- Type Parameters:
T- Type of evaluated entity- Returns:
- A
UnaryEquatorthat returns alwaystrue - See Also:
- verum
-
falsum
static <T> UnaryEquator<T> falsum()
- Type Parameters:
T- Type of evaluated entity- Returns:
- A
UnaryEquatorthat returns alwaysfalse - See Also:
- falsum
-
-