FailableLongPredicate
- @FunctionalInterface public abstract interface org.apache.commons.lang3.function.FailableLongPredicate<E extends Throwable>[source]
A functional interface like
LongPredicatethat declares aThrowable.- Parameters:
<E> – The kind of thrown exception or error.
- Since:
3.11
Fields and constants
FALSE singleton |
|
TRUE singleton |
- @SuppressWarnings({"rawtypes"}) public static final FailableLongPredicate FALSE[source]
FALSE singleton
- @SuppressWarnings({"rawtypes"}) public static final FailableLongPredicate 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. |
- public default FailableLongPredicate<E> and(FailableLongPredicate<E> other)[source]
Returns a composed
FailableLongPredicatelikeLongPredicate#and(LongPredicate).- Parameters:
other – A predicate that will be logically-ANDed with this predicate.
- Returns:
A composed
FailableLongPredicatelikeLongPredicate#and(LongPredicate).- Throws:
java.lang.NullPointerException – Thrown if other is null.
- @SuppressWarnings({"unchecked"}) public static <E extends Throwable> FailableLongPredicate<E> falsePredicate()[source]
Gets the FALSE singleton.
- Type parameters:
<E> – The kind of thrown exception or error.
- Returns:
The NOP singleton.
- public default FailableLongPredicate<E> negate()[source]
Returns a predicate that negates this predicate.
- Returns:
A predicate that negates this predicate.
- public default FailableLongPredicate<E> or(FailableLongPredicate<E> other)[source]
Returns a composed
FailableLongPredicatelikeLongPredicate#and(LongPredicate).- Parameters:
other – A predicate that will be logically-ORed with this predicate.
- Returns:
A composed
FailableLongPredicatelikeLongPredicate#and(LongPredicate).- Throws:
java.lang.NullPointerException – Thrown if other is null.
- public abstract boolean test(long 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.
- @SuppressWarnings({"unchecked"}) public static <E extends Throwable> FailableLongPredicate<E> truePredicate()[source]
Gets the TRUE singleton.
- Type parameters:
<E> – The kind of thrown exception or error.
- Returns:
The NOP singleton.