Module com.machinezoo.noexception
Interface ThrowingConsumer<T>
-
- Type Parameters:
-
T- seeConsumer
- 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 ThrowingConsumer<T>
Variation ofConsumerthat allows throwing checked exceptions.ThrowingConsumeris usually implemented by a lambda and passed toCheckedExceptionHandler.consumer(ThrowingConsumer). See noexception tutorial.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaccept(T t)Variation ofConsumer.accept(Object)that allows throwing checked exceptions.
-
-
-
Method Detail
-
accept
void accept(T t) throws Throwable
Variation ofConsumer.accept(Object)that allows throwing checked exceptions.- Parameters:
-
t- seeConsumer.accept(Object) - Throws:
-
Throwable- if unable to complete - See Also:
-
CheckedExceptionHandler.consumer(ThrowingConsumer),Consumer.accept(Object)
-
-