T - the type of the input to the operation@FunctionalInterface public interface UncheckedConsumer<T>
The operation can throw Exceptions.
| Modifier and Type | Method and Description |
|---|---|
void |
accept(T t)
Performs this operation on the given argument.
|
default UncheckedConsumer<T> |
andThen(UncheckedConsumer<? super T> after)
Returns a composed
UncheckedConsumer that performs, in sequence, this
operation followed by the after operation. |
static <T> UncheckedConsumer<T> |
from(Consumer<T> consumer)
Creates a new
UncheckedConsumer from an existing Consumer |
default Consumer<T> |
toConsumer() |
static <T> UncheckedConsumer<T> from(Consumer<T> consumer)
UncheckedConsumer from an existing ConsumerT - the type of the input to the operationconsumer - the consumerUncheckedConsumervoid accept(T t) throws Exception
t - the input argumentException - if anything wrong happendefault UncheckedConsumer<T> andThen(UncheckedConsumer<? super T> after)
UncheckedConsumer 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 operationUncheckedConsumer that performs in sequence this
operation followed by the after operationNullPointerException - if after is nulldefault Consumer<T> toConsumer()
Consumer executing the operation associated to this UncheckedConsumer. If the
operation throws an exception, the exception is rethrown, wrapped in a RuntimeException if needed.Copyright © 2019–2020 SmallRye. All rights reserved.