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