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