Package com.storedobject.common
Interface ETriFunction<T1,T2,T3,R,E extends Exception>
- Type Parameters:
T1- the type of the first argument to the functionT2- the type of the second argument to the functionT3- the type of the third 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.
A functional interface that represents a function accepting three arguments of types T1, T2, and T3,
which produces a result of type R, and can throw an exception of type E.
-
Method Summary
Modifier and TypeMethodDescriptionApplies this function to the given arguments and produces a result.static <T1,T2, T3, R, E extends Exception>
TriFunction<T1, T2, T3, R> wrap(ETriFunction<T1, T2, T3, R, E> function) Wraps an instance ofETriFunctioninto aTriFunction, converting any checked exceptions thrown by the underlying function into aSORuntimeException.
-
Method Details
-
apply
Applies this function to the given arguments and produces a result.- Parameters:
t1- the first argumentt2- the second argumentt3- the third argument- Returns:
- the result of applying this function to the given arguments
- Throws:
E- if an exception occurs during function execution
-
wrap
static <T1,T2, TriFunction<T1,T3, R, E extends Exception> T2, wrapT3, R> (ETriFunction<T1, T2, T3, R, E> function) Wraps an instance ofETriFunctioninto aTriFunction, converting any checked exceptions thrown by the underlying function into aSORuntimeException.- Type Parameters:
T1- the type of the first argument to the functionT2- the type of the second argument to the functionT3- the type of the third argument to the functionR- the type of the result of the functionE- the type of exception that theETriFunctionmay throw- Parameters:
function- theETriFunctionto be wrapped- Returns:
- a
TriFunctionwrapping the givenETriFunctionand converting its exceptions toSORuntimeException
-