T - the type of the input to the operationE - the type of exception could be thrown while performing operation@FunctionalInterface
public interface ConsumerEx<T,E extends java.lang.Throwable>
Consumer is expected
to operate via side-effects.
This is a functional interface
whose functional method is accept(Object).
| Modifier and Type | Method and Description |
|---|---|
void |
accept(T t)
Performs this operation on the given argument.
|
default ConsumerEx<T,E> |
andThen(ConsumerEx<? super T,E> after)
Returns a composed
Consumer that performs, in sequence, this
operation followed by the after operation. |
default <C extends java.lang.Throwable> |
cover(java.util.function.BiFunction<java.lang.String,java.lang.Throwable,C> cover) |
default <C extends java.lang.Throwable> |
cover(java.util.function.Function<java.lang.Throwable,java.lang.String> text,
java.util.function.BiFunction<java.lang.String,java.lang.Throwable,C> cover) |
default <C extends java.lang.Throwable> |
cover(java.lang.String exceptionText,
java.util.function.BiFunction<java.lang.String,java.lang.Throwable,C> cover) |
default <C extends java.lang.Throwable> |
cover(java.util.function.Supplier<java.lang.String> text,
java.util.function.BiFunction<java.lang.String,java.lang.Throwable,C> cover) |
default java.util.function.Consumer<T> |
unchecked() |
default java.util.function.Consumer<T> |
unchecked(java.util.function.BiFunction<java.lang.String,java.lang.Throwable,? extends java.lang.RuntimeException> cover) |
default java.util.function.Consumer<T> |
unchecked(java.util.function.Function<java.lang.Throwable,java.lang.String> text,
java.util.function.BiFunction<java.lang.String,java.lang.Throwable,? extends java.lang.RuntimeException> cover) |
default java.util.function.Consumer<T> |
unchecked(java.lang.String exceptionText,
java.util.function.BiFunction<java.lang.String,java.lang.Throwable,? extends java.lang.RuntimeException> cover) |
default java.util.function.Consumer<T> |
unchecked(java.util.function.Supplier<java.lang.String> text,
java.util.function.BiFunction<java.lang.String,java.lang.Throwable,? extends java.lang.RuntimeException> cover) |
void accept(T t) throws E extends java.lang.Throwable
t - the input argumentE extends java.lang.Throwabledefault ConsumerEx<T,E> andThen(ConsumerEx<? super T,E> after)
Consumer 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 operationConsumer that performs in sequence this
operation followed by the after operationjava.lang.NullPointerException - if after is nulldefault <C extends java.lang.Throwable> ConsumerEx<T,C> cover(java.lang.String exceptionText, java.util.function.BiFunction<java.lang.String,java.lang.Throwable,C> cover)
default <C extends java.lang.Throwable> ConsumerEx<T,C> cover(java.util.function.BiFunction<java.lang.String,java.lang.Throwable,C> cover)
default <C extends java.lang.Throwable> ConsumerEx<T,C> cover(java.util.function.Supplier<java.lang.String> text, java.util.function.BiFunction<java.lang.String,java.lang.Throwable,C> cover)
default <C extends java.lang.Throwable> ConsumerEx<T,C> cover(java.util.function.Function<java.lang.Throwable,java.lang.String> text, java.util.function.BiFunction<java.lang.String,java.lang.Throwable,C> cover)
default java.util.function.Consumer<T> unchecked(java.lang.String exceptionText, java.util.function.BiFunction<java.lang.String,java.lang.Throwable,? extends java.lang.RuntimeException> cover)
default java.util.function.Consumer<T> unchecked()
default java.util.function.Consumer<T> unchecked(java.util.function.BiFunction<java.lang.String,java.lang.Throwable,? extends java.lang.RuntimeException> cover)
default java.util.function.Consumer<T> unchecked(java.util.function.Supplier<java.lang.String> text, java.util.function.BiFunction<java.lang.String,java.lang.Throwable,? extends java.lang.RuntimeException> cover)
default java.util.function.Consumer<T> unchecked(java.util.function.Function<java.lang.Throwable,java.lang.String> text, java.util.function.BiFunction<java.lang.String,java.lang.Throwable,? extends java.lang.RuntimeException> cover)