T
- see Consumer
@FunctionalInterface public interface ThrowingConsumer<T>
Consumer
that allows throwing checked exceptions. ThrowingConsumer
is usually implemented by a lambda and passed to CheckedExceptionHandler.consumer(ThrowingConsumer)
. See noexception tutorial.
Modifier and Type | Method and Description |
---|---|
void |
accept(T t)
Variation of Consumer.accept(Object) that allows throwing checked exceptions.
|
void accept(T t) throws Throwable
Consumer.accept(Object)
that allows throwing checked exceptions.
t
- see Consumer.accept(Object)
Throwable
- if unable to complete
CheckedExceptionHandler.consumer(ThrowingConsumer)
, Consumer.accept(Object)
Copyright © 2017–2020 Robert Važan. All rights reserved.