java.util.function.BiFunction<T,U,R>ThrowingBinaryOperator<T>@FunctionalInterface
public interface ThrowingBiFunction<T,U,R>
extends java.util.function.BiFunction<T,U,R>
| Modifier and Type | Method | Description |
|---|---|---|
default <V> ThrowingBiFunction<T,U,V> |
andThen(ThrowingFunction<? super R,? extends V> after) |
Returns a composed
ThrowingBiFunction that first applies this function to the arguments, and then applies the after function to the result. |
default R |
apply(T former,
U latter) |
Applies this function to the given arguments.
|
R |
applyThrowing(T former,
U latter) |
Applies this function to the given arguments.
|
default java.util.function.BiFunction<T,U,R> |
fallbackTo(java.util.function.BiFunction<T,U,R> fallback) |
Returns a
BiFunction applying the given function to the arguments if this function throws an exception. |
default java.util.function.BiFunction<T,U,R> |
fallbackTo(java.util.function.BiFunction<T,U,R> fallback,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer) |
Returns a
BiFunction applying the given function to the arguments if this function throws an exception. |
default java.util.function.BiFunction<T,U,R> |
orReturn(R value) |
Returns a
BiFunction returning the given value if this function throws an exception. |
default java.util.function.BiFunction<T,U,R> |
orReturn(R value,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer) |
Returns a
BiFunction returning the given value if this function throws an exception. |
default ThrowingBiFunction<T,U,R> |
orThrow(java.lang.Class<? extends java.lang.RuntimeException> exceptionClass) |
Returns a
ThrowingBiFunction throwing an exception of the given type if this function throws an exception. |
default ThrowingBiFunction<T,U,R> |
orThrow(java.lang.Class<? extends java.lang.RuntimeException> exceptionClass,
java.lang.String message) |
Returns a
ThrowingBiFunction throwing an exception of the given type if this function throws an exception. |
default ThrowingBiFunction<T,U,R> |
orTryWith(ThrowingBiFunction<? super T,? super U,? extends R> other) |
Returns a
ThrowingBiFunction applying the given function to the arguments if this function throws an exception. |
default ThrowingBiFunction<T,U,R> |
orTryWith(ThrowingBiFunction<? super T,? super U,? extends R> other,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer) |
Returns a
ThrowingBiFunction applying the given function to the arguments if this function throws an exception. |
default <V> ThrowingBiFunction<T,U,V> andThen(ThrowingFunction<? super R,? extends V> after)
ThrowingBiFunction that first applies this function to the arguments, and then applies the after function to the result.java.lang.IllegalArgumentException - if after is nulldefault R apply(T former, U latter)
UncheckedException.R applyThrowing(T former, U latter) throws java.lang.Exception
java.lang.Exceptiondefault java.util.function.BiFunction<T,U,R> fallbackTo(java.util.function.BiFunction<T,U,R> fallback)
BiFunction applying the given function to the arguments if this function throws an exception.java.lang.IllegalArgumentException - if fallback is nulldefault java.util.function.BiFunction<T,U,R> fallbackTo(java.util.function.BiFunction<T,U,R> fallback, java.util.function.Consumer<java.lang.Exception> exceptionConsumer)
BiFunction applying the given function to the arguments if this function throws an exception.java.lang.IllegalArgumentException - if fallback is nulldefault java.util.function.BiFunction<T,U,R> orReturn(R value)
BiFunction returning the given value if this function throws an exception.default java.util.function.BiFunction<T,U,R> orReturn(R value, java.util.function.Consumer<java.lang.Exception> exceptionConsumer)
BiFunction returning the given value if this function throws an exception.default ThrowingBiFunction<T,U,R> orThrow(java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
ThrowingBiFunction throwing an exception of the given type if this function throws an exception.
The original exception thrown by this function 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 ThrowingBiFunction<T,U,R> orThrow(java.lang.Class<? extends java.lang.RuntimeException> exceptionClass, java.lang.String message)
ThrowingBiFunction throwing an exception of the given type if this function throws an exception.
The original exception thrown by this function 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 ThrowingBiFunction<T,U,R> orTryWith(ThrowingBiFunction<? super T,? super U,? extends R> other)
ThrowingBiFunction applying the given function to the arguments if this function throws an exception.java.lang.IllegalArgumentException - if other is nulldefault ThrowingBiFunction<T,U,R> orTryWith(ThrowingBiFunction<? super T,? super U,? extends R> other, java.util.function.Consumer<java.lang.Exception> exceptionConsumer)
ThrowingBiFunction applying the given function to the arguments if this function throws an exception.java.lang.IllegalArgumentException - if other is null