T - the type of the input to the operationE - Thrown exception type.@FunctionalInterface
public interface FailableConsumer<T,E extends java.lang.Throwable>
Consumer that declares a Throwable.
This is a functional interface whose functional method is accept(Object).
| Modifier and Type | Field and Description |
|---|---|
static FailableConsumer |
NOP
NOP singleton
|
| Modifier and Type | Method and Description |
|---|---|
void |
accept(T object)
Accepts the given arguments.
|
default FailableConsumer<T,E> |
andThen(FailableConsumer<? super T,E> after)
Returns a composed
Consumer like Consumer.andThen(Consumer). |
static <T,E extends java.lang.Throwable> |
nop()
Returns The NOP singleton.
|
static final FailableConsumer NOP
static <T,E extends java.lang.Throwable> FailableConsumer<T,E> nop()
T - Consumed type 1.E - The kind of thrown exception or error.void accept(T object) throws E extends java.lang.Throwable
object - the parameter for the consumable to acceptE - Thrown when the consumer fails.E extends java.lang.Throwabledefault FailableConsumer<T,E> andThen(FailableConsumer<? super T,E> after)
Consumer like Consumer.andThen(Consumer).after - the operation to perform after this operationConsumer like Consumer.andThen(Consumer).java.lang.NullPointerException - when after is nullCopyright © 2010 - 2023 Adobe. All Rights Reserved