接口 ThrowableConsumer<T>
-
- 类型参数:
T- the source type
- 函数接口:
- 这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。
@FunctionalInterface public interface ThrowableConsumer<T>
-
-
方法概要
所有方法 静态方法 实例方法 抽象方法 默认方法 修饰符和类型 方法 说明 voidaccept(T t)Applies this function to the given argument.default voidexecute(T t)ExecutesThrowableConsumerstatic <T> voidexecute(T t, ThrowableConsumer<T> consumer)ExecutesThrowableConsumer
-
-
-
方法详细资料
-
accept
void accept(T t) throws Throwable
Applies this function to the given argument.- 参数:
t- the function argument- 抛出:
Throwable- if met with any error
-
execute
default void execute(T t) throws RuntimeException
ExecutesThrowableConsumer- 参数:
t- the function argument- 抛出:
RuntimeException- wrappersThrowable
-
execute
static <T> void execute(T t, ThrowableConsumer<T> consumer)ExecutesThrowableConsumer- 类型参数:
T- the source type- 参数:
t- the function argumentconsumer-ThrowableConsumer
-
-