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