T - T@FunctionalInterface public interface ExceptionConsumer<T>
| 限定符和类型 | 方法和说明 |
|---|---|
void |
accept(T t)
Performs this operation on the given arguments.
|
default ExceptionConsumer<T> |
acceptThen(T t) |
default void |
acceptWithCatchAny(T t) |
default void |
acceptWithThrowAny(T t) |
default ExceptionConsumer<T> |
andThen(ExceptionConsumer<? super T> after)
Returns a composed
BiConsumer that performs, in sequence, this
operation followed by the after operation. |
default java.util.function.Consumer<T> |
toBiConsumer() |
void accept(T t) throws Exception
t - the first input argumentException - 异常default ExceptionConsumer<T> acceptThen(T t) throws Exception
Exceptiondefault void acceptWithCatchAny(T t)
default void acceptWithThrowAny(T t)
default ExceptionConsumer<T> andThen(ExceptionConsumer<? super T> after)
BiConsumer that performs, in sequence, this
operation followed by the after operation. If performing either
operation throws an exception, it is relayed to the caller of the
composed operation. If performing this operation throws an exception, the
after operation will not be performed.after - the operation to perform after this operationBiConsumer that performs in sequence this
operation followed by the after operationNullPointerException - if after is nulldefault java.util.function.Consumer<T> toBiConsumer()
Copyright © 2022. All rights reserved.