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