public static class DoubleSupplier.Util
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static DoubleSupplier |
safe(ThrowableDoubleSupplier<java.lang.Throwable> throwableSupplier)
Creates a safe
DoubleSupplier. |
static DoubleSupplier |
safe(ThrowableDoubleSupplier<java.lang.Throwable> throwableSupplier,
double resultIfFailed)
Creates a safe
DoubleSupplier. |
public static DoubleSupplier safe(@NotNull ThrowableDoubleSupplier<java.lang.Throwable> throwableSupplier)
DoubleSupplier.throwableSupplier - the supplier that may throw an exceptionDoubleSupplierjava.lang.NullPointerException - if throwableSupplier is nullsafe(com.annimon.stream.function.ThrowableDoubleSupplier, double)public static DoubleSupplier safe(@NotNull ThrowableDoubleSupplier<java.lang.Throwable> throwableSupplier, double resultIfFailed)
DoubleSupplier.throwableSupplier - the supplier that may throw an exceptionresultIfFailed - the result which returned if exception was thrownDoubleSupplierjava.lang.NullPointerException - if throwableSupplier is null