Package org.assertj.core.api
Interface ThrowingConsumer<T>
-
- Type Parameters:
T
- consumed type
- All Superinterfaces:
Consumer<T>
- 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> extends Consumer<T>
Consumer
that deals with checked exceptions by rethrowing them asRuntimeException
.More precisely,
RuntimeException
andAssertionError
are rethrown as they are while any otherThrowable
are rethrown asRuntimeException
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
accept(T input)
void
acceptThrows(T input)
-