T - the type of the input to the functionE - the type of the thrown checked exception@FunctionalInterface public interface ThrowingConsumer<T,E extends Exception>
| Modifier and Type | Method and Description |
|---|---|
void |
accept(T t) |
default ThrowingConsumer<T,E> |
andThenConsume(ThrowingConsumer<? super T,? extends E> after)
Chains given ThrowingConsumer instance
|
default ThrowingFunction<T,Void,E> |
asFunction() |
static <T> Consumer<T> |
sneaky(ThrowingConsumer<T,?> consumer)
Returns a new BiConsumer instance which rethrows the checked exception using the Sneaky Throws pattern
|
default Consumer<T> |
uncheck() |
static <T> Consumer<T> |
unchecked(ThrowingConsumer<T,?> consumer) |
static <T> Consumer<T> unchecked(ThrowingConsumer<T,?> consumer)
static <T> Consumer<T> sneaky(ThrowingConsumer<T,?> consumer)
default ThrowingConsumer<T,E> andThenConsume(ThrowingConsumer<? super T,? extends E> after)
after - - consumer that is chained after this instancedefault ThrowingFunction<T,Void,E> asFunction()
Copyright © 2020. All rights reserved.