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