java.util.function.ToDoubleBiFunction<T,U>@FunctionalInterface
public interface ThrowingToDoubleBiFunction<T,U>
extends java.util.function.ToDoubleBiFunction<T,U>
double-valued result, possibly throwing an exception.| Modifier and Type | Method | Description |
|---|---|---|
default double |
applyAsDouble(T former,
U latter) |
Applies this function to the given arguments.
|
double |
applyAsDoubleThrowing(T former,
U latter) |
Applies this function to the given arguments.
|
default java.util.function.ToDoubleBiFunction<T,U> |
fallbackTo(java.util.function.ToDoubleBiFunction<T,U> fallback) |
Returns a
ToDoubleBiFunction applying the given function to the arguments if this function throws an exception. |
default java.util.function.ToDoubleBiFunction<T,U> |
fallbackTo(java.util.function.ToDoubleBiFunction<T,U> fallback,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer) |
Returns a
ToDoubleBiFunction applying the given function to the arguments if this function throws an exception. |
default java.util.function.ToDoubleBiFunction<T,U> |
orReturn(double value) |
Returns a
ToDoubleBiFunction returning the given value if this function throws an exception. |
default java.util.function.ToDoubleBiFunction<T,U> |
orReturn(double value,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer) |
Returns a
ToDoubleBiFunction returning the given value if this function throws an exception. |
default ThrowingToDoubleBiFunction<T,U> |
orThrow(java.lang.Class<? extends java.lang.RuntimeException> exceptionClass) |
Returns a
ThrowingToDoubleBiFunction throwing an exception of the given type if this function throws an exception. |
default ThrowingToDoubleBiFunction<T,U> |
orThrow(java.lang.Class<? extends java.lang.RuntimeException> exceptionClass,
java.lang.String message) |
Returns a
ThrowingToDoubleBiFunction throwing an exception of the given type if this function throws an exception. |
default ThrowingToDoubleBiFunction<T,U> |
orTryWith(ThrowingToDoubleBiFunction<? super T,? super U> other) |
Returns a
ThrowingToDoubleBiFunction applying the given function to the argument if this function throws an exception. |
default ThrowingToDoubleBiFunction<T,U> |
orTryWith(ThrowingToDoubleBiFunction<? super T,? super U> other,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer) |
Returns a
ThrowingToDoubleBiFunction applying the given function to the argument if this function throws an exception. |
default double applyAsDouble(T former, U latter)
UncheckedException.double applyAsDoubleThrowing(T former, U latter) throws java.lang.Exception
java.lang.Exceptiondefault java.util.function.ToDoubleBiFunction<T,U> fallbackTo(java.util.function.ToDoubleBiFunction<T,U> fallback)
ToDoubleBiFunction applying the given function to the arguments if this function throws an exception.java.lang.IllegalArgumentException - if fallback is nulldefault java.util.function.ToDoubleBiFunction<T,U> fallbackTo(java.util.function.ToDoubleBiFunction<T,U> fallback, java.util.function.Consumer<java.lang.Exception> exceptionConsumer)
ToDoubleBiFunction applying the given function to the arguments if this function throws an exception.java.lang.IllegalArgumentException - if fallback is nulldefault java.util.function.ToDoubleBiFunction<T,U> orReturn(double value)
ToDoubleBiFunction returning the given value if this function throws an exception.default java.util.function.ToDoubleBiFunction<T,U> orReturn(double value, java.util.function.Consumer<java.lang.Exception> exceptionConsumer)
ToDoubleBiFunction returning the given value if this function throws an exception.default ThrowingToDoubleBiFunction<T,U> orThrow(java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
ThrowingToDoubleBiFunction 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 ThrowingToDoubleBiFunction<T,U> orThrow(java.lang.Class<? extends java.lang.RuntimeException> exceptionClass, java.lang.String message)
ThrowingToDoubleBiFunction 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 ThrowingToDoubleBiFunction<T,U> orTryWith(ThrowingToDoubleBiFunction<? super T,? super U> other)
ThrowingToDoubleBiFunction applying the given function to the argument if this function throws an exception.java.lang.IllegalArgumentException - if other is nulldefault ThrowingToDoubleBiFunction<T,U> orTryWith(ThrowingToDoubleBiFunction<? super T,? super U> other, java.util.function.Consumer<java.lang.Exception> exceptionConsumer)
ThrowingToDoubleBiFunction applying the given function to the argument if this function throws an exception.java.lang.IllegalArgumentException - if other is null