public static class IntFunction.Util
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static <R> IntFunction<R> |
safe(ThrowableIntFunction<? extends R,java.lang.Throwable> throwableFunction)
Creates a safe
IntFunction, |
static <R> IntFunction<R> |
safe(ThrowableIntFunction<? extends R,java.lang.Throwable> throwableFunction,
R resultIfFailed)
Creates a safe
IntFunction, |
public static <R> IntFunction<R> safe(@NotNull ThrowableIntFunction<? extends R,java.lang.Throwable> throwableFunction)
IntFunction,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.ThrowableIntFunction, java.lang.Object)public static <R> IntFunction<R> safe(@NotNull ThrowableIntFunction<? extends R,java.lang.Throwable> throwableFunction, @Nullable R resultIfFailed)
IntFunction,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