Interface FailableLongPredicate<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
LongPredicate
that declares a Throwable
.- Since:
- 3.11
-
Field Summary
Modifier and TypeFieldDescriptionstatic final FailableLongPredicate
FALSE singletonstatic final FailableLongPredicate
TRUE singleton -
Method Summary
Modifier and TypeMethodDescriptiondefault FailableLongPredicate<E>
and
(FailableLongPredicate<E> other) Returns a composedFailableLongPredicate
likeLongPredicate.and(LongPredicate)
.static <E extends Throwable>
FailableLongPredicate<E>Returns The FALSE singleton.default FailableLongPredicate<E>
negate()
Returns a predicate that negates this predicate.default FailableLongPredicate<E>
or
(FailableLongPredicate<E> other) Returns a composedFailableLongPredicate
likeLongPredicate.and(LongPredicate)
.boolean
test
(long value) Tests the predicate.static <E extends Throwable>
FailableLongPredicate<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 composedFailableLongPredicate
likeLongPredicate.and(LongPredicate)
.- Parameters:
other
- a predicate that will be logically-ANDed with this predicate.- Returns:
- a composed
FailableLongPredicate
likeLongPredicate.and(LongPredicate)
. - Throws:
NullPointerException
- if other is null
-
negate
Returns a predicate that negates this predicate.- Returns:
- a predicate that negates this predicate.
-
or
Returns a composedFailableLongPredicate
likeLongPredicate.and(LongPredicate)
.- Parameters:
other
- a predicate that will be logically-ORed with this predicate.- Returns:
- a composed
FailableLongPredicate
likeLongPredicate.and(LongPredicate)
. - 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.
-