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