Interface FailableIntPredicate<E extends Throwable>
- Type Parameters:
E- The kind of thrown exception or error.
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A functional interface like
IntPredicate that declares a Throwable.- Since:
- 3.11
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final FailableIntPredicateFALSE singletonstatic final FailableIntPredicateTRUE singleton -
Method Summary
Modifier and TypeMethodDescriptiondefault FailableIntPredicate<E> and(FailableIntPredicate<E> other) Returns a composedFailableIntPredicatelikeIntPredicate.and(IntPredicate).static <E extends Throwable>
FailableIntPredicate<E> Returns The FALSE singleton.default FailableIntPredicate<E> negate()Returns a predicate that negates this predicate.default FailableIntPredicate<E> or(FailableIntPredicate<E> other) Returns a composedFailableIntPredicatelikeIntPredicate.and(IntPredicate).booleantest(int value) Tests the predicate.static <E extends Throwable>
FailableIntPredicate<E> Returns The TRUE singleton.
-
Field Details
-
FALSE
FALSE singleton -
TRUE
TRUE singleton
-
-
Method Details
-
falsePredicate
Returns The FALSE singleton.- Type Parameters:
E- The kind of thrown exception or error.- Returns:
- The NOP singleton.
-
truePredicate
Returns The TRUE singleton.- Type Parameters:
E- The kind of thrown exception or error.- Returns:
- The NOP singleton.
-
and
Returns a composedFailableIntPredicatelikeIntPredicate.and(IntPredicate).- Parameters:
other- a predicate that will be logically-ANDed with this predicate.- Returns:
- a composed
FailableIntPredicatelikeIntPredicate.and(IntPredicate). - Throws:
NullPointerException- if other is null
-
negate
Returns a predicate that negates this predicate.- Returns:
- a predicate that negates this predicate.
-
or
Returns a composedFailableIntPredicatelikeIntPredicate.and(IntPredicate).- Parameters:
other- a predicate that will be logically-ORed with this predicate.- Returns:
- a composed
FailableIntPredicatelikeIntPredicate.and(IntPredicate). - Throws:
NullPointerException- if other is null
-
test
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.
-