T - the source type@FunctionalInterface public interface ThrowableConsumer<T>
| Modifier and Type | Method and Description |
|---|---|
void |
accept(T t)
Applies this function to the given argument.
|
default void |
execute(T t)
Executes
ThrowableConsumer |
static <T> void |
execute(T t,
ThrowableConsumer<T> consumer)
Executes
ThrowableConsumer |
void accept(T t) throws Throwable
t - the function argumentThrowable - if met with any errordefault void execute(T t) throws RuntimeException
ThrowableConsumert - the function argumentRuntimeException - wrappers Throwablestatic <T> void execute(T t,
ThrowableConsumer<T> consumer)
ThrowableConsumerT - the source typet - the function argumentconsumer - ThrowableConsumerCopyright © 2011–2020 The Apache Software Foundation. All rights reserved.