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 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 is false, then the other equator is not evaluated.
        Parameters:
        other - The other (never null equator
        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 is true, then the other equator is not evaluated.
        Parameters:
        other - The other (never null equator
        Returns:
        The compound equator
      • negate

        default UnaryEquator<T> negate()
        Specified by:
        negate in interface BiPredicate<T,​T>
        Returns:
        an equator that represents the logical negation of this one
      • comparing

        static <T> UnaryEquator<T> comparing​(Comparator<? super T> c)
        Converts a Comparator into a UnaryEquator that returns true if the comparator returns zero
        Type Parameters:
        T - Type of entity
        Parameters:
        c - The (never null) comparator
        Returns:
        The equivalent equator
      • verum

        static <T> UnaryEquator<T> verum()
        Type Parameters:
        T - Type of evaluated entity
        Returns:
        A UnaryEquator that returns always true
        See Also:
        verum
      • falsum

        static <T> UnaryEquator<T> falsum()
        Type Parameters:
        T - Type of evaluated entity
        Returns:
        A UnaryEquator that returns always false
        See Also:
        falsum