Package io.activej.common.function
Interface BiConsumerEx<T,U>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Represents a
BiConsumer capable of throwing exceptions-
Method Summary
Modifier and TypeMethodDescriptionvoidstatic <T,U> BiConsumerEx<T, U> of(BiConsumer<T, U> uncheckedFn) Creates aBiConsumerExout ofBiConsumerstatic <T,U> BiConsumer<T, U> uncheckedOf(BiConsumerEx<T, U> checkedFn) Creates aBiConsumerout ofBiConsumerEx
-
Method Details
-
accept
- Throws:
Exception
-
of
Creates aBiConsumerExout ofBiConsumerIf given consumer throws
UncheckedException, its cause will be propagated- Parameters:
uncheckedFn- originalBiConsumer- Returns:
- a consumer capable of throwing exceptions
-
uncheckedOf
Creates aBiConsumerout ofBiConsumerExIf given consumer throws a checked exception, it will be wrapped into
UncheckedExceptionand rethrownUnchecked exceptions will be handled by thread's
FatalErrorHandler- Parameters:
checkedFn- originalBiConsumerEx- Returns:
- a consumer
-