接口 ThrowableFunction<T,R>
-
- 类型参数:
T- the source typeR- the return type
- 函数接口:
- 这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。
@FunctionalInterface public interface ThrowableFunction<T,R>
-
-
方法概要
所有方法 静态方法 实例方法 抽象方法 默认方法 修饰符和类型 方法 说明 Rapply(T t)Applies this function to the given argument.default Rexecute(T t)ExecutesThrowableFunctionstatic <T,R>
Rexecute(T t, ThrowableFunction<T,R> function)ExecutesThrowableFunction
-
-
-
方法详细资料
-
apply
R apply(T t) throws Throwable
Applies this function to the given argument.- 参数:
t- the function argument- 返回:
- the function result
- 抛出:
Throwable- if met with any error
-
execute
default R execute(T t) throws RuntimeException
ExecutesThrowableFunction- 参数:
t- the function argument- 返回:
- the function result
- 抛出:
RuntimeException- wrappersThrowable
-
execute
static <T,R> R execute(T t, ThrowableFunction<T,R> function)ExecutesThrowableFunction- 类型参数:
T- the source typeR- the return type- 参数:
t- the function argumentfunction-ThrowableFunction- 返回:
- the result after execution
-
-