T - @FunctionalInterface public interface ExceptionConsumer<T> extends Consumer<T>
Consumer to consume with potentially throws an exception. Throwed exceptions will delegate as RuntimeException| Modifier and Type | Method and Description |
|---|---|
default void |
accept(T t) |
void |
acceptWithException(T t)
Consume object with potentially throws an exception.
|
static <T> Consumer<T> |
wrap(ExceptionConsumer<T> consumer) |
void acceptWithException(T t) throws Exception
t - object to consumeExceptionstatic <T> Consumer<T> wrap(ExceptionConsumer<T> consumer)
Copyright © 2020. All rights reserved.