Interface ObjLongPredicate<T>

  • Type Parameters:
    T - the type of the object parameter
    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 ObjLongPredicate<T>
    A predicate of two arguments - one object and one long.

    This takes two arguments and returns a boolean result.

    See Also:
    BiPredicate
    • Method Detail

      • test

        boolean test​(T obj,
                     long value)
        Evaluates the predicate.
        Parameters:
        obj - the first argument
        value - the second argument
        Returns:
        true if the arguments match the predicate
      • and

        default ObjLongPredicate<T> and​(ObjLongPredicate<? super T> other)
        Returns a new predicate that returns true if both predicates return true.

        The second predicate is only invoked if the first returns true.

        Parameters:
        other - the second predicate
        Returns:
        the combined predicate, "this AND that"
        Throws:
        NullPointerException - if the other predicate is null
      • or

        default ObjLongPredicate<T> or​(ObjLongPredicate<? super T> other)
        Returns a new predicate that returns true if either predicates returns true.

        The second predicate is only invoked if the first returns false.

        Parameters:
        other - the second predicate
        Returns:
        the combined predicate, "this OR that"
        Throws:
        NullPointerException - if the other predicate is null
      • negate

        default ObjLongPredicate<T> negate()
        Returns a new predicate that negates the result of this predicate.
        Returns:
        the predicate, "NOT this"