| Modifier and Type | Method and Description |
|---|---|
static <T> Supplier<T> |
safe(ThrowableSupplier<? extends T,Throwable> throwableSupplier)
Creates a safe
Supplier. |
static <T> Supplier<T> |
safe(ThrowableSupplier<? extends T,Throwable> throwableSupplier,
T resultIfFailed)
Creates a safe
Supplier. |
public static <T> Supplier<T> safe(ThrowableSupplier<? extends T,Throwable> throwableSupplier)
Supplier.T - the type of the resultthrowableSupplier - the supplier that may throw an exceptionSupplierNullPointerException - if throwableSupplier is nullsafe(com.annimon.stream.function.ThrowableSupplier, java.lang.Object)public static <T> Supplier<T> safe(ThrowableSupplier<? extends T,Throwable> throwableSupplier, T resultIfFailed)
Supplier.T - the type of the resultthrowableSupplier - the supplier that may throw an exceptionresultIfFailed - the result which returned if exception was thrownSupplierNullPointerException - if throwableSupplier is nullCopyright © 2017. All rights reserved.