public static class LongFunction.Util
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static <R> LongFunction<R> |
safe(ThrowableLongFunction<? extends R,java.lang.Throwable> throwableFunction)
Creates a safe
LongFunction, |
static <R> LongFunction<R> |
safe(ThrowableLongFunction<? extends R,java.lang.Throwable> throwableFunction,
R resultIfFailed)
Creates a safe
LongFunction, |
public static <R> LongFunction<R> safe(@NotNull ThrowableLongFunction<? extends R,java.lang.Throwable> throwableFunction)
LongFunction,R - the type of the result of the functionthrowableFunction - the function that may throw an exceptionnull if exception was thrownjava.lang.NullPointerException - if throwableFunction is nullsafe(com.annimon.stream.function.ThrowableLongFunction, java.lang.Object)public static <R> LongFunction<R> safe(@NotNull ThrowableLongFunction<? extends R,java.lang.Throwable> throwableFunction, @Nullable 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 thrownresultIfFailedjava.lang.NullPointerException - if throwableFunction is null