@FunctionalInterfacepublic interfaceIntPredicate
int-valued argument. This is theint-consuming primitive type specialization ofPredicate.This is afunctional interface whose functional method istest(int).
Predicate| Modifier and Type | Method | Description |
|---|---|---|
defaultIntPredicate | and(IntPredicate other) | Returns a composed predicate that represents a short-circuiting logical AND of this predicate and another. |
defaultIntPredicate | negate() | Returns a predicate that represents the logical negation of this predicate. |
defaultIntPredicate | or(IntPredicate other) | Returns a composed predicate that represents a short-circuiting logical OR of this predicate and another. |
boolean | test(int value) | Evaluates this predicate on the given argument. |
boolean test(int value)
value - the input argumenttrue if the input argument matches the predicate, otherwisefalsedefault IntPredicate and(IntPredicate other)
false, then theother predicate is not evaluated.Any exceptions thrown during evaluation of either predicate are relayed to the caller; if evaluation of this predicate throws an exception, theother predicate will not be evaluated.
other - a predicate that will be logically-ANDed with this predicateother predicateNullPointerException - if other is nulldefault IntPredicate negate()
default IntPredicate or(IntPredicate other)
true, then theother predicate is not evaluated.Any exceptions thrown during evaluation of either predicate are relayed to the caller; if evaluation of this predicate throws an exception, theother predicate will not be evaluated.
other - a predicate that will be logically-ORed with this predicateother predicateNullPointerException - if other is null