java.util.function.IntPredicate@FunctionalInterface
public interface ThrowingIntPredicate
extends java.util.function.IntPredicate
boolean-valued function) of one int-valued argument, possibly throwing an exception.| Modifier and Type | Method | Description |
|---|---|---|
default java.util.function.IntPredicate |
fallbackTo(java.util.function.IntPredicate fallback) |
Returns a
IntPredicate evaluating the given predicate on the argument if this predicate throws an exception. |
default java.util.function.IntPredicate |
fallbackTo(java.util.function.IntPredicate fallback,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer) |
Returns a
IntPredicate evaluating the given predicate on the argument if this predicate throws an exception. |
default java.util.function.IntPredicate |
orReturn(boolean value) |
Returns an
IntPredicate returning the given value if this predicate throws an exception. |
default java.util.function.IntPredicate |
orReturn(boolean value,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer) |
Returns an
IntPredicate returning the given value if this predicate throws an exception. |
default ThrowingIntPredicate |
orThrow(java.lang.Class<? extends java.lang.RuntimeException> exceptionClass) |
Returns a
ThrowingIntPredicate throwing an exception of the given type if this predicate throws an exception. |
default ThrowingIntPredicate |
orThrow(java.lang.Class<? extends java.lang.RuntimeException> exceptionClass,
java.lang.String message) |
Returns a
ThrowingIntPredicate throwing an exception of the given type if this predicate throws an exception. |
default ThrowingIntPredicate |
orTryWith(ThrowingIntPredicate other) |
Returns a
ThrowingIntPredicate evaluating the given predicate on the argument if this predicate throws an exception. |
default ThrowingIntPredicate |
orTryWith(ThrowingIntPredicate other,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer) |
Returns a
ThrowingIntPredicate evaluating the given predicate on the argument if this predicate throws an exception. |
default boolean |
test(int argument) |
Evaluates this predicate on the given argument.
|
boolean |
testThrowing(int argument) |
Evaluates this predicate on the given argument.
|
default boolean test(int argument)
UncheckedException.test in interface java.util.function.IntPredicateboolean testThrowing(int argument)
throws java.lang.Exception
java.lang.Exceptiondefault java.util.function.IntPredicate fallbackTo(java.util.function.IntPredicate fallback)
IntPredicate evaluating the given predicate on the argument if this predicate throws an exception.java.lang.IllegalArgumentException - if fallback is nulldefault java.util.function.IntPredicate fallbackTo(java.util.function.IntPredicate fallback,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer)
IntPredicate evaluating the given predicate on the argument if this predicate throws an exception.java.lang.IllegalArgumentException - if fallback is nulldefault java.util.function.IntPredicate orReturn(boolean value)
IntPredicate returning the given value if this predicate throws an exception.default java.util.function.IntPredicate orReturn(boolean value,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer)
IntPredicate returning the given value if this predicate throws an exception.default ThrowingIntPredicate orThrow(java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
ThrowingIntPredicate 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 ThrowingIntPredicate orThrow(java.lang.Class<? extends java.lang.RuntimeException> exceptionClass, java.lang.String message)
ThrowingIntPredicate 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 ThrowingIntPredicate orTryWith(ThrowingIntPredicate other)
ThrowingIntPredicate evaluating the given predicate on the argument if this predicate throws an exception.java.lang.IllegalArgumentException - if other is nulldefault ThrowingIntPredicate orTryWith(ThrowingIntPredicate other, java.util.function.Consumer<java.lang.Exception> exceptionConsumer)
ThrowingIntPredicate evaluating the given predicate on the argument if this predicate throws an exception.java.lang.IllegalArgumentException - if other is null