Package io.activej.common.function
Interface BiFunctionEx<T,U,R>
- 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
BiFunction capable of throwing exceptions-
Method Summary
Modifier and TypeMethodDescriptionstatic <T,U, R> BiFunctionEx<T, U, R> of(BiFunction<T, U, R> uncheckedFn) Creates aBiFunctionExout ofBiFunctionstatic <T,U, R> BiFunction<T, U, R> uncheckedOf(BiFunctionEx<T, U, R> checkedFn) Creates aBiFunctionout ofBiFunctionEx
-
Method Details
-
apply
- Throws:
Exception
-
of
Creates aBiFunctionExout ofBiFunctionIf given function throws
UncheckedException, its cause will be propagated- Parameters:
uncheckedFn- originalBiFunction- Returns:
- a function capable of throwing exceptions
-
uncheckedOf
Creates aBiFunctionout ofBiFunctionExIf given function throws a checked exception, it will be wrapped into
UncheckedExceptionand rethrownUnchecked exceptions will be handled by thread's
FatalErrorHandler- Parameters:
checkedFn- originalBiFunctionEx- Returns:
- a function
-