java.util.function.LongPredicate@FunctionalInterface
public interface ThrowingLongPredicate
extends java.util.function.LongPredicate
boolean-valued function) of one long-valued argument, possibly throwing an exception.| Modifier and Type | Method | Description |
|---|---|---|
default java.util.function.LongPredicate |
fallbackTo(java.util.function.LongPredicate fallback) |
Returns a
LongPredicate evaluating the given predicate on the argument if this predicate throws an exception. |
default java.util.function.LongPredicate |
fallbackTo(java.util.function.LongPredicate fallback,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer) |
Returns a
LongPredicate evaluating the given predicate on the argument if this predicate throws an exception. |
default java.util.function.LongPredicate |
orReturn(boolean value) |
Returns a
LongPredicate returning the given value if this predicate throws an exception. |
default java.util.function.LongPredicate |
orReturn(boolean value,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer) |
Returns a
LongPredicate returning the given value if this predicate throws an exception. |
default ThrowingLongPredicate |
orThrow(java.lang.Class<? extends java.lang.RuntimeException> exceptionClass) |
Returns a
ThrowingLongPredicate throwing an exception of the given type if this predicate throws an exception. |
default ThrowingLongPredicate |
orThrow(java.lang.Class<? extends java.lang.RuntimeException> exceptionClass,
java.lang.String message) |
Returns a
ThrowingLongPredicate throwing an exception of the given type if this predicate throws an exception. |
default ThrowingLongPredicate |
orTryWith(ThrowingLongPredicate other) |
Returns a
ThrowingLongPredicate evaluating the given predicate on the argument if this predicate throws an exception. |
default ThrowingLongPredicate |
orTryWith(ThrowingLongPredicate other,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer) |
Returns a
ThrowingLongPredicate evaluating the given predicate on the argument if this predicate throws an exception. |
default boolean |
test(long argument) |
Evaluates this predicate on the given argument.
|
boolean |
testThrowing(long argument) |
Evaluates this predicate on the given argument.
|
default boolean test(long argument)
UncheckedException.test in interface java.util.function.LongPredicateboolean testThrowing(long argument)
throws java.lang.Exception
java.lang.Exceptiondefault java.util.function.LongPredicate fallbackTo(java.util.function.LongPredicate fallback)
LongPredicate evaluating the given predicate on the argument if this predicate throws an exception.java.lang.IllegalArgumentException - if fallback is nulldefault java.util.function.LongPredicate fallbackTo(java.util.function.LongPredicate fallback,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer)
LongPredicate evaluating the given predicate on the argument if this predicate throws an exception.java.lang.IllegalArgumentException - if fallback is nulldefault java.util.function.LongPredicate orReturn(boolean value)
LongPredicate returning the given value if this predicate throws an exception.default java.util.function.LongPredicate orReturn(boolean value,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer)
LongPredicate returning the given value if this predicate throws an exception.default ThrowingLongPredicate orThrow(java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
ThrowingLongPredicate throwing an exception of the given type if this predicate throws an exception.
The original exception thrown by this predicate is the cause of the thrown exception.
The exception class must have a constructor accepting a single Throwable as an argument.
java.lang.IllegalArgumentException - if exceptionClass is nulldefault ThrowingLongPredicate orThrow(java.lang.Class<? extends java.lang.RuntimeException> exceptionClass, java.lang.String message)
ThrowingLongPredicate throwing an exception of the given type if this predicate throws an exception.
The original exception thrown by this predicate is the cause of the thrown exception.
The exception class must have a constructor accepting String and Throwable as arguments.
java.lang.IllegalArgumentException - if exceptionClass is nulldefault ThrowingLongPredicate orTryWith(ThrowingLongPredicate other)
ThrowingLongPredicate evaluating the given predicate on the argument if this predicate throws an exception.java.lang.IllegalArgumentException - if other is nulldefault ThrowingLongPredicate orTryWith(ThrowingLongPredicate other, java.util.function.Consumer<java.lang.Exception> exceptionConsumer)
ThrowingLongPredicate evaluating the given predicate on the argument if this predicate throws an exception.java.lang.IllegalArgumentException - if other is null