T - The type of the input to the function.R - The type of the result of the function.@FunctionalInterface public interface SQLFunction<T,R>
SQLException throwing equivalent of Function.| Modifier and Type | Method and Description |
|---|---|
default <V> SQLFunction<T,V> |
andThen(SQLFunction<? super R,? extends V> after)
Returns a composed function that first applies this function to its input, and then applies the
after function to the result. |
R |
apply(T t)
Applies this function to the given argument.
|
static <T,R> SQLFunction<T,R> |
checked(Function<? super T,? extends R> function)
Returns a function that applies the
function function to its input, and unwraps any UncheckedSQLException that is thrown by
throwing its cause. |
default <V> SQLFunction<V,R> |
compose(SQLFunction<? super V,? extends T> before)
Returns a composed function that first applies the
before function to its input, and then applies this function to the result. |
static <T> SQLFunction<T,T> |
identity()
Returns a function that always returns its input argument.
|
static <T,R> Function<T,R> |
unchecked(SQLFunction<? super T,? extends R> function)
Returns a function that applies the
function function to its input, and wraps any SQLException that is thrown in an
UncheckedSQLException. |
R apply(T t) throws SQLException
t - The function argument.SQLException - If an SQL error occurs.default <V> SQLFunction<V,R> compose(SQLFunction<? super V,? extends T> before)
before function to its input, and then applies this function to the result.
If evaluation of either function throws an exception, it is relayed to the caller of the composed function.V - The type of input to the before function, and to the composed function.before - The function to apply before this function is applied.before function and then applies this function.NullPointerException - If before is null.andThen(SQLFunction)default <V> SQLFunction<T,V> andThen(SQLFunction<? super R,? extends V> after)
after function to the result.
If evaluation of either function throws an exception, it is relayed to the caller of the composed function.V - The type of output of the after function, and of the composed function.after - The function to apply after this function is applied.after function.NullPointerException - If after is null.compose(SQLFunction)static <T> SQLFunction<T,T> identity()
T - The type of the input and output objects to the function.static <T,R> Function<T,R> unchecked(SQLFunction<? super T,? extends R> function)
function function to its input, and wraps any SQLException that is thrown in an
UncheckedSQLException.T - The type of the input to the function.R - The type of the result of the function.function - The function to apply when the returned function is applied.function function to its input, and wraps any SQLException that is thrown in an
UncheckedSQLException.NullPointerException - If function is null.static <T,R> SQLFunction<T,R> checked(Function<? super T,? extends R> function)
function function to its input, and unwraps any UncheckedSQLException that is thrown by
throwing its cause.T - The type of the input to the function.R - The type of the result of the function.function - The function to apply when the returned function is applied.function function to its input, and unwraps any UncheckedSQLException that is thrown.NullPointerException - If function is null.Copyright © 2017. All rights reserved.