Package com.storedobject.common
Interface EFunction<T,R,E extends Exception>
- Type Parameters:
T- the type of the input to the functionR- the type of the result of the functionE- the type of exception that may be thrown
- 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 representing a function that accepts one argument, produces a result,
and may throw a checked exception during execution.
- Author:
- Syam
-
Method Summary
Modifier and TypeMethodDescriptionApplies this function to the given argument and returns the result.Wraps anEFunctioninto a standardFunction, converting any checked exception it may throw into aSORuntimeException.
-
Method Details
-
apply
-
wrap
Wraps anEFunctioninto a standardFunction, converting any checked exception it may throw into aSORuntimeException.- Type Parameters:
T- the type of the input to the functionR- the type of the result of the functionE- the type of exception that the wrapped function may throw- Parameters:
function- theEFunctionto be wrapped- Returns:
- a
Functionthat applies the givenEFunctionand handles exceptions by wrapping them in aSORuntimeException
-