T
- the type of the argument@FunctionalInterface
public interface ConsumerWithException<T>
Modifier and Type | Method and Description |
---|---|
void |
accept(T t) |
static <T> java.util.function.Consumer<T> |
asConsumer(ConsumerWithException<T> unchecked) |
static <T> java.util.function.Consumer<T> |
asConsumerIgnoreException(ConsumerWithException<T> unchecked) |
default java.util.function.Consumer<T> |
ignoreException() |
default java.util.function.Consumer<T> |
orElseThrow() |
void accept(T t) throws java.lang.Exception
java.lang.Exception
default java.util.function.Consumer<T> orElseThrow()
default java.util.function.Consumer<T> ignoreException()
static <T> java.util.function.Consumer<T> asConsumer(ConsumerWithException<T> unchecked)
static <T> java.util.function.Consumer<T> asConsumerIgnoreException(ConsumerWithException<T> unchecked)