FailableIntPredicate¶
- @FunctionalInterface public interface org.apache.commons.lang3.function.FailableIntPredicate<E extends Throwable>[source]¶
A functional interface like
IntPredicatethat declares aThrowable.- Type parameters:
<E> – The kind of thrown exception or error.
- Since:
3.11
Fields and constants¶
|
FALSE singleton |
|
|
TRUE singleton |
- static final FailableIntPredicate FALSE[source]¶
FALSE singleton
- static final FailableIntPredicate TRUE[source]¶
TRUE singleton
Methods¶
|
Returns a composed |
|
|
Gets the FALSE singleton. |
|
|
Returns a predicate that negates this predicate. |
|
|
Returns a composed |
|
|
Tests the predicate. |
|
|
Gets the TRUE singleton. |
- default FailableIntPredicate<E> and(FailableIntPredicate<E> other)[source]¶
Returns a composed
FailableIntPredicatelikeIntPredicate.and(IntPredicate).- Parameters:
other – A predicate that will be logically-ANDed with this predicate.
- Returns:
A composed
FailableIntPredicatelikeIntPredicate.and(IntPredicate).- Throws:
NullPointerException– Thrown if other is null.
- static <E extends Throwable> FailableIntPredicate<E> falsePredicate()[source]¶
Gets the FALSE singleton.
- Type parameters:
<E> – The kind of thrown exception or error.
- Returns:
The NOP singleton.
- default FailableIntPredicate<E> negate()[source]¶
Returns a predicate that negates this predicate.
- Returns:
A predicate that negates this predicate.
- default FailableIntPredicate<E> or(FailableIntPredicate<E> other)[source]¶
Returns a composed
FailableIntPredicatelikeIntPredicate.and(IntPredicate).- Parameters:
other – A predicate that will be logically-ORed with this predicate.
- Returns:
A composed
FailableIntPredicatelikeIntPredicate.and(IntPredicate).- Throws:
NullPointerException– Thrown if other is null.
- boolean test(int value) throws E[source]¶
Tests the predicate.
- Parameters:
value – The parameter for the predicate to accept.
- Returns:
trueif the input argument matches the predicate,falseotherwise.- Throws:
E – Thrown when the consumer fails.
- static <E extends Throwable> FailableIntPredicate<E> truePredicate()[source]¶
Gets the TRUE singleton.
- Type parameters:
<E> – The kind of thrown exception or error.
- Returns:
The NOP singleton.