Interface ObjIntPredicate<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 ObjIntPredicate<T>
    A predicate of two arguments - one object and one int.

    This takes two arguments and returns a boolean result.

    See Also:
    BiPredicate
    • Method Detail

      • test

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

        default ObjIntPredicate<T> and​(ObjIntPredicate<? 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 ObjIntPredicate<T> or​(ObjIntPredicate<? 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 ObjIntPredicate<T> negate()
        Returns a new predicate that negates the result of this predicate.
        Returns:
        the predicate, "NOT this"