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