T - the type of the input to the operation@FunctionalInterface public interface ThrowingConsumer<T,X extends Exception>
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.
|
static <T> @NotNull Consumer<T> |
of(@NotNull ThrowingConsumer<T,?> throwingConsumer)
Creates and returns a new Consumer that will wrap any exceptions thrown by the
provided
throwingConsumer in a ThrowingConsumerException |
@NotNull static <T> @NotNull Consumer<T> of(@NotNull @NotNull ThrowingConsumer<T,?> throwingConsumer)
throwingConsumer in a ThrowingConsumerExceptionT - consumed typethrowingConsumer - to wrap (non-null)Copyright © 2023. All rights reserved.