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