java.util.function.IntUnaryOperator@FunctionalInterface
public interface ThrowingIntUnaryOperator
extends java.util.function.IntUnaryOperator
int-valued operand that produces an int-valued result, possibly throwing an exception.| Modifier and Type | Method | Description |
|---|---|---|
default ThrowingIntUnaryOperator |
andThen(ThrowingIntUnaryOperator after) |
Returns a composed
ThrowingIntUnaryOperator that first applies this operator to the argument, and then applies the after operator to the result. |
default int |
applyAsInt(int argument) |
Applies this operator to the given argument.
|
int |
applyAsIntThrowing(int argument) |
Applies this operator to the given argument.
|
default ThrowingIntUnaryOperator |
compose(ThrowingIntUnaryOperator before) |
Returns a composed
ThrowingIntUnaryOperator that first applies the before operator to the argument, and then applies this operator to the result. |
default java.util.function.IntUnaryOperator |
fallbackTo(java.util.function.IntUnaryOperator fallback) |
Returns an
IntUnaryOperator applying the given operator to the argument if this operator throws an exception. |
default java.util.function.IntUnaryOperator |
fallbackTo(java.util.function.IntUnaryOperator fallback,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer) |
Returns an
IntUnaryOperator applying the given operator to the argument if this operator throws an exception. |
default java.util.function.IntUnaryOperator |
orReturn(int value) |
Returns an
IntUnaryOperator returning the given value if this operator throws an exception. |
default java.util.function.IntUnaryOperator |
orReturn(int value,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer) |
Returns an
IntUnaryOperator returning the given value if this operator throws an exception. |
default ThrowingIntUnaryOperator |
orThrow(java.lang.Class<? extends java.lang.RuntimeException> exceptionClass) |
Returns a
ThrowingIntUnaryOperator throwing an exception of the given type if this operator throws an exception. |
default ThrowingIntUnaryOperator |
orThrow(java.lang.Class<? extends java.lang.RuntimeException> exceptionClass,
java.lang.String message) |
Returns a
ThrowingIntUnaryOperator throwing an exception of the given type if this operator throws an exception. |
default ThrowingIntUnaryOperator |
orTryWith(ThrowingIntUnaryOperator other) |
Returns a
ThrowingIntUnaryOperator applying the given operator to the argument if this operator throws an exception. |
default ThrowingIntUnaryOperator |
orTryWith(ThrowingIntUnaryOperator other,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer) |
Returns a
ThrowingIntUnaryOperator applying the given operator to the argument if this operator throws an exception. |
default ThrowingIntUnaryOperator andThen(ThrowingIntUnaryOperator after)
ThrowingIntUnaryOperator that first applies this operator to the argument, and then applies the after operator to the result.java.lang.IllegalArgumentException - if after is nulldefault int applyAsInt(int argument)
UncheckedException.applyAsInt in interface java.util.function.IntUnaryOperatorint applyAsIntThrowing(int argument)
throws java.lang.Exception
java.lang.Exceptiondefault ThrowingIntUnaryOperator compose(ThrowingIntUnaryOperator before)
ThrowingIntUnaryOperator that first applies the before operator to the argument, and then applies this operator to the result.java.lang.IllegalArgumentException - if before is nulldefault java.util.function.IntUnaryOperator fallbackTo(java.util.function.IntUnaryOperator fallback)
IntUnaryOperator applying the given operator to the argument if this operator throws an exception.java.lang.IllegalArgumentException - if fallback is nulldefault java.util.function.IntUnaryOperator fallbackTo(java.util.function.IntUnaryOperator fallback,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer)
IntUnaryOperator applying the given operator to the argument if this operator throws an exception.java.lang.IllegalArgumentException - if fallback is nulldefault java.util.function.IntUnaryOperator orReturn(int value)
IntUnaryOperator returning the given value if this operator throws an exception.default java.util.function.IntUnaryOperator orReturn(int value,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer)
IntUnaryOperator returning the given value if this operator throws an exception.default ThrowingIntUnaryOperator orThrow(java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
ThrowingIntUnaryOperator 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 ThrowingIntUnaryOperator orThrow(java.lang.Class<? extends java.lang.RuntimeException> exceptionClass, java.lang.String message)
ThrowingIntUnaryOperator 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 ThrowingIntUnaryOperator orTryWith(ThrowingIntUnaryOperator other)
ThrowingIntUnaryOperator applying the given operator to the argument if this operator throws an exception.java.lang.IllegalArgumentException - if other is nulldefault ThrowingIntUnaryOperator orTryWith(ThrowingIntUnaryOperator other, java.util.function.Consumer<java.lang.Exception> exceptionConsumer)
ThrowingIntUnaryOperator applying the given operator to the argument if this operator throws an exception.java.lang.IllegalArgumentException - if other is null