T - The input typeR - The return type@FunctionalInterface
public interface ThrowingFunction<T,R>
| Modifier and Type | Method and Description |
|---|---|
R |
apply(T t)
Apply the function to the input.
|
default java.util.function.Function<T,R> |
toFunction()
Convert this ThrowingFunction to a standard Function.
|
static <T,R> java.util.function.Function<T,R> |
toFunction(ThrowingFunction<T,R> function)
Convert a ThrowingFunction to a standard Function.
|
default R |
tryApply(T t)
Apply the function to the input and sneakily throw any exceptions.
|
static <T,R> java.util.function.Function<T,R> toFunction(ThrowingFunction<T,R> function)
T - The input typeR - The return typefunction - The ThrowingFunctionR apply(T t) throws java.lang.Throwable
t - The inputjava.lang.Throwable - If an error occursdefault R tryApply(T t)
t - The input