Package com.storedobject.common
Interface EBiFunction<T1,T2,R,E extends Exception>
- Type Parameters:
T1- the type of the first argument to the functionT2- the type of the second argument to the functionR- the type of the result of the functionE- the type of exception that the function might throw
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Functional interface that represents a function which accepts two arguments and produces a result.
It allows for a checked exception to be thrown during execution.
- Author:
- Syam
-
Method Summary
Modifier and TypeMethodDescriptionApplies this function to the given arguments and produces a result.static <T1,T2, R, E extends Exception>
BiFunction<T1, T2, R> wrap(EBiFunction<T1, T2, R, E> function) Wraps anEBiFunctionthat allows checked exceptions into a standardBiFunction, rethrowing any caught exception as aSORuntimeException.
-
Method Details
-
apply
-
wrap
Wraps anEBiFunctionthat allows checked exceptions into a standardBiFunction, rethrowing any caught exception as aSORuntimeException.- Type Parameters:
T1- the type of the first argument to the functionT2- the type of the second argument to the functionR- the type of the result of the functionE- the type of exception that the function might throw- Parameters:
function- theEBiFunctionto be wrapped- Returns:
- a
BiFunctionthat performs the same logic as the providedEBiFunction, but converts any caught exception to aSORuntimeException
-