T - the source typeR - the return type@FunctionalInterface public interface ThrowableFunction<T,R>
| Modifier and Type | Method and Description |
|---|---|
R |
apply(T t)
Applies this function to the given argument.
|
default R |
execute(T t)
Executes
ThrowableFunction |
static <T,R> R |
execute(T t,
ThrowableFunction<T,R> function)
Executes
ThrowableFunction |
R apply(T t) throws Throwable
t - the function argumentThrowable - if met with any errordefault R execute(T t) throws RuntimeException
ThrowableFunctiont - the function argumentRuntimeException - wrappers Throwablestatic <T,R> R execute(T t,
ThrowableFunction<T,R> function)
ThrowableFunctionT - the source typeR - the return typet - the function argumentfunction - ThrowableFunctionCopyright © 2011–2022 The Apache Software Foundation. All rights reserved.