Top Description Methods
org.apache.sshd.common.util.functors

public Interface UnaryEquator<T>

extends BiPredicate<T, T>
Annotations
@FunctionalInterface
Type Parameters
<T>
Type of compared entity
Imports
java.util.Comparator, .Objects, java.util.function.BiPredicate

Checks equality between 2 entities of same type
Author
Apache MINA SSHD Project

Method Summary

Modifier and TypeMethod and Description
public default UnaryEquator<T>

Returns:

The compound equator
and
(UnaryEquator<? super T>
The other (never null equator
other
)

Returns a composed equator that represents a short-circuiting logical AND of this equator and another.

public static <
Type of entity
T
>
UnaryEquator<T>

Returns:

The equivalent equator
comparing
(Comparator<? super T>
The (never null) comparator
c
)

Converts a Comparator into a UnaryEquator that returns true if the comparator returns zero

public static <
Type of entity
T
>
UnaryEquator<T>

Returns:

The default equality checker
defaultEquality
()

public static <
Type of evaluated entity
T
>
UnaryEquator<T>

Returns:

A UnaryEquator that returns always false
falsum
()

public static <T> boolean
isSameReference(T o1, T o2)

public default UnaryEquator<T>

Returns:

an equator that represents the logical negation of this one
negate
()

Overrides default java.util.function.BiPredicate.negate.

Returns a predicate that represents the logical negation of this predicate.

public default UnaryEquator<T>

Returns:

The compound equator
or
(UnaryEquator<? super T>
The other (never null equator
other
)

Returns a composed equator that represents a short-circuiting logical AND of this equator and another.

public static <
Type of entity
T
>
UnaryEquator<T>

Returns:

An equator that checks reference equality
referenceEquality
()

public static <
Type of evaluated entity
T
>
UnaryEquator<T>

Returns:

A UnaryEquator that returns always true
verum
()

Inherited from java.util.function.BiPredicate:
andortest

Method Detail

andback to summary
public 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 is false, then the other equator is not evaluated.

Parameters
other:UnaryEquator<? super T>

The other (never null equator

Returns:UnaryEquator<T>

The compound equator

comparingback to summary
public static <T> UnaryEquator<T> comparing(Comparator<? super T> c)

Converts a Comparator into a UnaryEquator that returns true if the comparator returns zero

Parameters
<T>
Type of entity
c:Comparator<? super T>

The (never null) comparator

Returns:UnaryEquator<T>

The equivalent equator

defaultEqualityback to summary
public static <T> UnaryEquator<T> defaultEquality()
Parameters
<T>
Type of entity
Returns:UnaryEquator<T>

The default equality checker

See Also
Objects#equals(Object, Object)
falsumback to summary
public static <T> UnaryEquator<T> falsum()
Parameters
<T>
Type of evaluated entity
Returns:UnaryEquator<T>

A UnaryEquator that returns always false

See Also
falsum
isSameReferenceback to summary
public static <T> boolean isSameReference(T o1, T o2)
negateback to summary
public default UnaryEquator<T> negate()

Overrides default java.util.function.BiPredicate.negate.

Doc from java.util.function.BiPredicate.negate.

Returns a predicate that represents the logical negation of this predicate.

Returns:UnaryEquator<T>

an equator that represents the logical negation of this one

Annotations
@Override
orback to summary
public 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 is true, then the other equator is not evaluated.

Parameters
other:UnaryEquator<? super T>

The other (never null equator

Returns:UnaryEquator<T>

The compound equator

referenceEqualityback to summary
public static <T> UnaryEquator<T> referenceEquality()
Parameters
<T>
Type of entity
Returns:UnaryEquator<T>

An equator that checks reference equality

See Also
UnaryEquator#isSameReference(Object, Object)
verumback to summary
public static <T> UnaryEquator<T> verum()
Parameters
<T>
Type of evaluated entity
Returns:UnaryEquator<T>

A UnaryEquator that returns always true

See Also
verum