T
- the type of the input to the operationE
- Thrown exception type.@FunctionalInterface public interface FailableConsumer<T,E extends 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 Throwable> |
nop()
Returns The NOP singleton.
|
static final FailableConsumer NOP
static <T,E extends Throwable> FailableConsumer<T,E> nop()
T
- Consumed type 1.E
- The kind of thrown exception or error.default 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)
.NullPointerException
- when after
is nullCopyright © 2001–2023 The Apache Software Foundation. All rights reserved.