public static class LongFunction.Util extends Object
| Modifier and Type | Method and Description |
|---|---|
static <R> LongFunction<R> |
safe(ThrowableLongFunction<? extends R,Throwable> throwableFunction)
Creates a safe
LongFunction, |
static <R> LongFunction<R> |
safe(ThrowableLongFunction<? extends R,Throwable> throwableFunction,
R resultIfFailed)
Creates a safe
LongFunction, |
public static <R> LongFunction<R> safe(ThrowableLongFunction<? extends R,Throwable> throwableFunction)
LongFunction,R - the type of the result of the functionthrowableFunction - the function that may throw an exceptionnull if exception was thrownNullPointerException - if throwableFunction is nullsafe(com.annimon.stream.function.ThrowableLongFunction, java.lang.Object)public static <R> LongFunction<R> safe(ThrowableLongFunction<? extends R,Throwable> throwableFunction, R resultIfFailed)
LongFunction,R - the type of the result of the functionthrowableFunction - the function that may throw an exceptionresultIfFailed - the result which returned if exception was thrownresultIfFailedNullPointerException - if throwableFunction is nullCopyright © 2017. All rights reserved.