Package com.google.mu.function
Interface CheckedConsumer<T,E extends java.lang.Throwable>
-
- 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 CheckedConsumer<T,E extends java.lang.Throwable>
A consumer that can throw checked exceptions.
-
-
Method Summary
Modifier and Type Method Description void
accept(T input)
default CheckedConsumer<T,E>
andThen(CheckedConsumer<? super T,E> that)
Returns a newCheckedConsumer
that also passes the input tothat
.
-
-
-
Method Detail
-
accept
void accept(T input) throws E extends java.lang.Throwable
- Throws:
E extends java.lang.Throwable
-
andThen
default CheckedConsumer<T,E> andThen(CheckedConsumer<? super T,E> that)
Returns a newCheckedConsumer
that also passes the input tothat
. For example:out::writeObject.andThen(logger::info).accept("message")
.
-
-