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
Modifier and TypeFieldDescriptionstatic final FailableIntPredicate
FALSE singletonstatic final FailableIntPredicate
TRUE singleton -
Method Summary
Modifier and TypeMethodDescriptiondefault FailableIntPredicate<E>
and
(FailableIntPredicate<E> other) Returns a composedFailableIntPredicate
likeIntPredicate.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 composedFailableIntPredicate
likeIntPredicate.and(IntPredicate)
.boolean
test
(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 composedFailableIntPredicate
likeIntPredicate.and(IntPredicate)
.- Parameters:
other
- a predicate that will be logically-ANDed with this predicate.- Returns:
- a composed
FailableIntPredicate
likeIntPredicate.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 composedFailableIntPredicate
likeIntPredicate.and(IntPredicate)
.- Parameters:
other
- a predicate that will be logically-ORed with this predicate.- Returns:
- a composed
FailableIntPredicate
likeIntPredicate.and(IntPredicate)
. - Throws:
NullPointerException
- if other is null
-
test
Tests the predicate.- Parameters:
value
- the parameter for the predicate to accept.- Returns:
true
if the input argument matches the predicate,false
otherwise.- Throws:
E
- Thrown when the consumer fails.
-