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