java.util.function.DoubleSupplier@FunctionalInterface
public interface ThrowingDoubleSupplier
extends java.util.function.DoubleSupplier
double-valued results, possibly throwing an exception.| Modifier and Type | Method | Description |
|---|---|---|
default java.util.function.DoubleSupplier |
fallbackTo(java.util.function.DoubleSupplier fallback) |
Returns a
DoubleSupplier returning from the given supplier if this supplier throws an exception. |
default java.util.function.DoubleSupplier |
fallbackTo(java.util.function.DoubleSupplier fallback,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer) |
Returns a
DoubleSupplier returning from the given supplier if this supplier throws an exception. |
default double |
getAsDouble() |
Returns a result.
|
double |
getAsDoubleThrowing() |
Returns a result.
|
default java.util.function.DoubleSupplier |
orReturn(double value) |
Returns a
DoubleSupplier returning the given value if this supplier throws an exception. |
default java.util.function.DoubleSupplier |
orReturn(double value,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer) |
Returns a
DoubleSupplier returning the given value if this supplier throws an exception. |
default ThrowingDoubleSupplier |
orThrow(java.lang.Class<? extends java.lang.RuntimeException> exceptionClass) |
Returns a
ThrowingDoubleSupplier throwing an exception of the given type if this supplier throws an exception. |
default ThrowingDoubleSupplier |
orThrow(java.lang.Class<? extends java.lang.RuntimeException> exceptionClass,
java.lang.String message) |
Returns a
ThrowingDoubleSupplier throwing an exception of the given type if this supplier throws an exception. |
default ThrowingDoubleSupplier |
orTryWith(ThrowingDoubleSupplier other) |
Returns a
ThrowingDoubleSupplier returning from the given supplier if this supplier throws an exception. |
default ThrowingDoubleSupplier |
orTryWith(ThrowingDoubleSupplier other,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer) |
Returns a
ThrowingDoubleSupplier returning from the given supplier if this supplier throws an exception. |
default java.util.function.DoubleSupplier fallbackTo(java.util.function.DoubleSupplier fallback)
DoubleSupplier returning from the given supplier if this supplier throws an exception.java.lang.IllegalArgumentException - if fallback is nulldefault java.util.function.DoubleSupplier fallbackTo(java.util.function.DoubleSupplier fallback,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer)
DoubleSupplier returning from the given supplier if this supplier throws an exception.java.lang.IllegalArgumentException - if fallback is nulldefault double getAsDouble()
UncheckedException.getAsDouble in interface java.util.function.DoubleSupplierdouble getAsDoubleThrowing()
throws java.lang.Exception
java.lang.Exceptiondefault java.util.function.DoubleSupplier orReturn(double value)
DoubleSupplier returning the given value if this supplier throws an exception.default java.util.function.DoubleSupplier orReturn(double value,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer)
DoubleSupplier returning the given value if this supplier throws an exception.default ThrowingDoubleSupplier orThrow(java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
ThrowingDoubleSupplier throwing an exception of the given type if this supplier throws an exception.
The original exception thrown by this supplier 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 ThrowingDoubleSupplier orThrow(java.lang.Class<? extends java.lang.RuntimeException> exceptionClass, java.lang.String message)
ThrowingDoubleSupplier throwing an exception of the given type if this supplier throws an exception.
The original exception thrown by this supplier 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 ThrowingDoubleSupplier orTryWith(ThrowingDoubleSupplier other)
ThrowingDoubleSupplier returning from the given supplier if this supplier throws an exception.java.lang.IllegalArgumentException - if other is nulldefault ThrowingDoubleSupplier orTryWith(ThrowingDoubleSupplier other, java.util.function.Consumer<java.lang.Exception> exceptionConsumer)
ThrowingDoubleSupplier returning from the given supplier if this supplier throws an exception.java.lang.IllegalArgumentException - if other is null