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