Package org.assertj.core.api
Interface ThrowingConsumer<T>
-
- Type Parameters:
T- consumed type
- All Superinterfaces:
java.util.function.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 java.util.function.Consumer<T>Consumerthat deals with checked exceptions by rethrowing them asRuntimeException.More precisely,
RuntimeExceptionandAssertionErrorare rethrown as they are, while any otherThrowableis wrapped in aRuntimeExceptionand rethrown.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidaccept(T input)voidacceptThrows(T input)
-