Module org.firebirdsql.jaybird
Package org.firebirdsql.jaybird.util
Interface SQLExceptionThrowingFunction<T,R>
- Type Parameters:
T- type of the input to the functionR- type of the result of the function
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Function that can throw a
SQLException.- Since:
- 6
- Author:
- Mark Rotteveel
-
Method Summary
Modifier and TypeMethodDescriptionConverts this instance to a normalFunction, throwingUncheckedSQLExceptioninstead ofSQLException.static <T,R> Function<T, R> Convenience method to convert aSQLExceptionThrowingFunctionto aFunction.static <T,R> SQLExceptionThrowingFunction<T, R> Converts a normalFunctionto aSQLExceptionThrowingFunction, unwrapping anyUncheckedSQLExceptionthrown toSQLException.
-
Method Details
-
apply
- Throws:
SQLException
-
toFunction
Converts this instance to a normalFunction, throwingUncheckedSQLExceptioninstead ofSQLException.- Returns:
- normal
Functioninstance throwingUncheckedSQLException - See Also:
-
toFunction
Convenience method to convert aSQLExceptionThrowingFunctionto aFunction.Equivalent to
f.toFunction(), but can be used for call-site type inference.- Type Parameters:
T- type of the input to the functionR- type of the result of the function- Parameters:
f- function to convert- Returns:
- normal
Functioninstance throwingUncheckedSQLException - See Also:
-
toSQLExceptionThrowingFunction
Converts a normalFunctionto aSQLExceptionThrowingFunction, unwrapping anyUncheckedSQLExceptionthrown toSQLException.- Type Parameters:
T- type of the input to the functionR- type of the result of the function- Parameters:
f- function to convert- Returns:
SQLExceptionThrowingFunctioninstance- See Also:
-