接口 ThrowableBiFunction<T,U,R>
-
- 类型参数:
T- the type of the first argument to be applied for the functionU- the type of the second argument to be applied for the functionR- the type of the result of the function
- 函数接口:
- 这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。
@FunctionalInterface public interface ThrowableBiFunction<T,U,R>BiFunctionwithThrowable- 从以下版本开始:
- 1.0.0
- 另请参阅:
Function,Throwable
-
-
嵌套类概要
嵌套类 修饰符和类型 接口 说明 static interfaceThrowableBiFunction.ExceptionHandler<T,U,R>The handler interface forexception
-
字段概要
字段 修饰符和类型 字段 说明 static ThrowableBiFunction.ExceptionHandlerDEFAULT_EXCEPTION_HANDLER
-
方法概要
所有方法 静态方法 实例方法 抽象方法 修饰符和类型 方法 说明 Rapply(T first, U second)Applies this function to the given argument.static <T,U,R>
Rexecute(T first, U second, ThrowableBiFunction<T,U,R> function)ExecutesThrowableBiFunctionwiththe default exception handlingstatic <T,U,R>
Rexecute(T first, U second, ThrowableBiFunction<T,U,R> function, ThrowableBiFunction.ExceptionHandler<T,U,R> exceptionHandler)ExecutesThrowableBiFunctionwith the customized exception handling
-
-
-
字段详细资料
-
DEFAULT_EXCEPTION_HANDLER
static final ThrowableBiFunction.ExceptionHandler DEFAULT_EXCEPTION_HANDLER
-
-
方法详细资料
-
apply
R apply(T first, U second) throws java.lang.Throwable
Applies this function to the given argument.- 参数:
first- the first argument to be applied for the functionsecond- the second argument to be applied for the function- 返回:
- the function result
- 抛出:
java.lang.Throwable- if met with any error
-
execute
static <T,U,R> R execute(T first, U second, ThrowableBiFunction<T,U,R> function) throws java.lang.NullPointerExceptionExecutesThrowableBiFunctionwiththe default exception handling- 类型参数:
T- the first argument typeU- the second argument typeR- the return type- 参数:
first- the first argument to be applied for the functionsecond- the second argument to be applied for the functionfunction-ThrowableBiFunction- 返回:
- the result after execution
- 抛出:
java.lang.NullPointerException- iffunctionisnull
-
execute
static <T,U,R> R execute(T first, U second, ThrowableBiFunction<T,U,R> function, ThrowableBiFunction.ExceptionHandler<T,U,R> exceptionHandler) throws java.lang.NullPointerExceptionExecutesThrowableBiFunctionwith the customized exception handling- 类型参数:
T- the first argument typeU- the second argument typeR- the return type- 参数:
first- the first argument to be applied for the functionsecond- the second argument to be applied for the functionexceptionHandler- the handler to handle the function argument and the exception that the#apply(T, U)method throwsfunction-ThrowableBiFunction- 返回:
- the result after execution
- 抛出:
java.lang.NullPointerException- iffunctionandexceptionHandlerisnull
-
-