Package com.storedobject.common
Interface ETriConsumer<T1,T2,T3,E extends Exception>
- Type Parameters:
T1- The type of the first argument to the operation.T2- The type of the second argument to the operation.T3- The type of the third argument to the operation.E- The type of exception that may be thrown.
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A functional interface that represents an operation that accepts three input arguments and potentially throws a checked exception.
- Author:
- Syam
-
Method Summary
Modifier and TypeMethodDescriptionvoidPerforms the operation with the given three input arguments, potentially throwing a checked exception.static <T1,T2, T3, E extends Exception>
TriConsumer<T1, T2, T3> wrap(ETriConsumer<T1, T2, T3, E> consumer) Wraps anETriConsumerinto aTriConsumerby handling checked exceptions and rethrowing them as runtime exceptions.
-
Method Details
-
accept
Performs the operation with the given three input arguments, potentially throwing a checked exception.- Parameters:
t1- The first input argument.t2- The second input argument.t3- The third input argument.- Throws:
E- If an error occurs during the operation.
-
wrap
static <T1,T2, TriConsumer<T1,T3, E extends Exception> T2, wrapT3> (ETriConsumer<T1, T2, T3, E> consumer) Wraps anETriConsumerinto aTriConsumerby handling checked exceptions and rethrowing them as runtime exceptions.- Type Parameters:
T1- The type of the first argument to the operation.T2- The type of the second argument to the operation.T3- The type of the third argument to the operation.E- The type of exception that may be thrown by theETriConsumer.- Parameters:
consumer- TheETriConsumerto be wrapped.- Returns:
- A
TriConsumerthat wraps the givenETriConsumer, rethrowing any checked exceptions as runtime exceptions.
-