T - The type of the input to the operation.@FunctionalInterface public interface SQLConsumer<T>
SQLException throwing equivalent of Consumer.| Modifier and Type | Method and Description |
|---|---|
void |
accept(T t)
Performs this operation on the given argument.
|
default SQLConsumer<T> |
andThen(SQLConsumer<? super T> after)
Returns a composed
SQLConsumer that performs, in sequence, this operation followed by the after operation. |
static <T> SQLConsumer<T> |
checked(Consumer<? super T> operation)
Returns an
SQLConsumer that performs the operation operation, and unwraps any UncheckedSQLException that is thrown by
throwing its cause. |
static <T> Consumer<T> |
unchecked(SQLConsumer<? super T> operation)
Returns a
Consumer that performs the operation operation, and wraps any SQLException that is thrown in an
UncheckedSQLException. |
void accept(T t) throws SQLException
t - The input argument.SQLException - If an SQL error occurs.default SQLConsumer<T> andThen(SQLConsumer<? super T> after)
SQLConsumer that performs, in sequence, this operation followed by the after operation.
If performing either operation throws an exception, it is relayed to the caller of the composed operation.
If performing this operation throws an exception, the after operation will not be performed.after - The operation to perform after this operation.SQLConsumer that performs in sequence this operation followed by the after operation.NullPointerException - If after is null.static <T> Consumer<T> unchecked(SQLConsumer<? super T> operation)
Consumer that performs the operation operation, and wraps any SQLException that is thrown in an
UncheckedSQLException.T - The type of the input to the operation.operation - The operation to perform when the returned operation is performed.Consumer that performs the operation operation on its input, and wraps any SQLException that is thrown in
an UncheckedSQLException.NullPointerException - If operation is null.static <T> SQLConsumer<T> checked(Consumer<? super T> operation)
SQLConsumer that performs the operation operation, and unwraps any UncheckedSQLException that is thrown by
throwing its cause.T - The type of the input to the operation.operation - The operation to perform when the returned operation is performed.SQLConsumer that performs the operation operation on its input, and unwraps any UncheckedSQLException that
is thrown.NullPointerException - If the given operation is null.Copyright © 2017. All rights reserved.