Package org.nuxeo.common.function
Interface ThrowableConsumer<T,E extends Throwable>
-
- Type Parameters:
T
- the type of the input to the operationE
- the type of exception to throw
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface ThrowableConsumer<T,E extends Throwable>
- Since:
- 11.1
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
accept(T t)
static <T,E extends Throwable>
Consumer<T>asConsumer(ThrowableConsumer<T,E> throwableConsumer)
default Consumer<T>
toConsumer()
-
-
-
Method Detail
-
toConsumer
default Consumer<T> toConsumer()
- Returns:
- this
ThrowableConsumer
as aConsumer
throwing the checked exception as an unchecked one
-
asConsumer
static <T,E extends Throwable> Consumer<T> asConsumer(ThrowableConsumer<T,E> throwableConsumer)
- Returns:
- the given
ThrowableConsumer
as aConsumer
throwing the checked exception as an unchecked one
-
-