T - The type of results supplied by this supplier.@FunctionalInterface public interface SQLSupplier<T>
SQLException throwing equivalent of Supplier.| Modifier and Type | Method and Description |
|---|---|
static <T> SQLSupplier<T> |
checked(Supplier<? extends T> supplier)
Returns a supplier that returns the result of the
supplier supplier, and unwraps any UncheckedSQLException that is thrown by
throwing its cause. |
T |
get()
Gets a result.
|
static <T> Supplier<T> |
unchecked(SQLSupplier<? extends T> supplier)
Returns a supplier that returns the result of the
supplier supplier, and wraps any SQLException that is thrown in an
UncheckedSQLException. |
T get() throws SQLException
SQLException - If an SQL error occurs.static <T> Supplier<T> unchecked(SQLSupplier<? extends T> supplier)
supplier supplier, and wraps any SQLException that is thrown in an
UncheckedSQLException.T - The type of results supplied by the supplier.supplier - The supplier that will provide results for the returned supplier.supplier supplier, and wraps any SQLException that is thrown in an
UncheckedSQLException.NullPointerException - If supplier is null.static <T> SQLSupplier<T> checked(Supplier<? extends T> supplier)
supplier supplier, and unwraps any UncheckedSQLException that is thrown by
throwing its cause.T - The type of results supplied by the supplier.supplier - The supplier that will provide results for the returned supplier.supplier supplier, and unwraps any UncheckedSQLException that is thrown.NullPointerException - If supplier is null.Copyright © 2017. All rights reserved.