java.util.function.LongToDoubleFunction@FunctionalInterface
public interface ThrowingLongToDoubleFunction
extends java.util.function.LongToDoubleFunction
long-valued argument and produces a double-valued result, possibly throwing an exception.| Modifier and Type | Method | Description |
|---|---|---|
default double |
applyAsDouble(long argument) |
Applies this function to the given argument.
|
double |
applyAsDoubleThrowing(long argument) |
Applies this function to the given argument.
|
default java.util.function.LongToDoubleFunction |
fallbackTo(java.util.function.LongToDoubleFunction fallback) |
Returns a
LongToDoubleFunction applying the given function to the argument if this function throws an exception. |
default java.util.function.LongToDoubleFunction |
fallbackTo(java.util.function.LongToDoubleFunction fallback,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer) |
Returns a
LongToDoubleFunction applying the given function to the argument if this function throws an exception. |
default java.util.function.LongToDoubleFunction |
orReturn(double value) |
Returns a
LongToDoubleFunction returning the given value if this function throws an exception. |
default java.util.function.LongToDoubleFunction |
orReturn(double value,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer) |
Returns a
LongToDoubleFunction returning the given value if this function throws an exception. |
default ThrowingLongToDoubleFunction |
orThrow(java.lang.Class<? extends java.lang.RuntimeException> exceptionClass) |
Returns a
ThrowingLongToDoubleFunction throwing an exception of the given type if this function throws an exception. |
default ThrowingLongToDoubleFunction |
orThrow(java.lang.Class<? extends java.lang.RuntimeException> exceptionClass,
java.lang.String message) |
Returns a
ThrowingLongToDoubleFunction throwing an exception of the given type if this function throws an exception. |
default ThrowingLongToDoubleFunction |
orTryWith(ThrowingLongToDoubleFunction other) |
Returns a
ThrowingLongToDoubleFunction applying the given function to the argument if this function throws an exception. |
default ThrowingLongToDoubleFunction |
orTryWith(ThrowingLongToDoubleFunction other,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer) |
Returns a
ThrowingLongToDoubleFunction applying the given function to the argument if this function throws an exception. |
default double applyAsDouble(long argument)
UncheckedException.applyAsDouble in interface java.util.function.LongToDoubleFunctiondouble applyAsDoubleThrowing(long argument)
throws java.lang.Exception
java.lang.Exceptiondefault java.util.function.LongToDoubleFunction fallbackTo(java.util.function.LongToDoubleFunction fallback)
LongToDoubleFunction applying the given function to the argument if this function throws an exception.java.lang.IllegalArgumentException - if fallback is nulldefault java.util.function.LongToDoubleFunction fallbackTo(java.util.function.LongToDoubleFunction fallback,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer)
LongToDoubleFunction applying the given function to the argument if this function throws an exception.java.lang.IllegalArgumentException - if fallback is nulldefault java.util.function.LongToDoubleFunction orReturn(double value)
LongToDoubleFunction returning the given value if this function throws an exception.default java.util.function.LongToDoubleFunction orReturn(double value,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer)
LongToDoubleFunction returning the given value if this function throws an exception.default ThrowingLongToDoubleFunction orThrow(java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
ThrowingLongToDoubleFunction 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 ThrowingLongToDoubleFunction orThrow(java.lang.Class<? extends java.lang.RuntimeException> exceptionClass, java.lang.String message)
ThrowingLongToDoubleFunction 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 ThrowingLongToDoubleFunction orTryWith(ThrowingLongToDoubleFunction other)
ThrowingLongToDoubleFunction applying the given function to the argument if this function throws an exception.java.lang.IllegalArgumentException - if other is nulldefault ThrowingLongToDoubleFunction orTryWith(ThrowingLongToDoubleFunction other, java.util.function.Consumer<java.lang.Exception> exceptionConsumer)
ThrowingLongToDoubleFunction applying the given function to the argument if this function throws an exception.java.lang.IllegalArgumentException - if other is null