- Type Parameters:
T- the generic input typeR- the generic return type
public interface FunctionThrowable<T,R>
A functional interface that throws checked exceptions when applied.
-
Method Summary
Modifier and TypeMethodDescriptionApply the function computation and return a result.static <T,R> R applyUnchecked(T input, FunctionThrowable<T, R> func) Applies an input value to a checked function and returns the function result.static <T,R> Function <T, R> unchecked(FunctionThrowable<T, R> func) Converts a checked function lambda to an unchecked/runtime function equivalent.
-
Method Details
-
unchecked
Converts a checked function lambda to an unchecked/runtime function equivalent.- Type Parameters:
T- the generic input typeR- the generic return type- Parameters:
func- the func- Returns:
- the function
-
applyUnchecked
Applies an input value to a checked function and returns the function result.- Type Parameters:
T- the generic input typeR- the generic return type- Parameters:
func- the func- Returns:
- output of the function
-
apply
-