Package org.pipecraft.infra.concurrent
Interface FailableBiConsumer<A,B,E extends Exception>
-
- Type Parameters:
A- The type of the first argument being consumedB- The type of the second argument being consumedE- The exception type
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface FailableBiConsumer<A,B,E extends Exception>
A bi-consumer that may fail with a checked exception during the execution of the accept(..) method.- Author:
- Eyal Schneider
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidaccept(A a, B b)Performs this operation on the given arguments.default FailableBiConsumer<A,B,E>andThen(FailableBiConsumer<? super A,? super B,? extends E> after)Similar to andThen method ofConsumerstatic <X,Y,E extends Exception>
FailableBiConsumer<X,Y,E>fromBiConsumer(BiConsumer<X,Y> biConsumer)Utility method for wrapping a bi-consumer with a failable bi-consumer
-
-
-
Method Detail
-
accept
void accept(A a, B b) throws E extends Exception
Performs this operation on the given arguments.
-
andThen
default FailableBiConsumer<A,B,E> andThen(FailableBiConsumer<? super A,? super B,? extends E> after)
Similar to andThen method ofConsumer
-
fromBiConsumer
static <X,Y,E extends Exception> FailableBiConsumer<X,Y,E> fromBiConsumer(BiConsumer<X,Y> biConsumer)
Utility method for wrapping a bi-consumer with a failable bi-consumer- Parameters:
biConsumer- The bi-consumer to wrap- Returns:
- The failable bi-consumer (which effectively never throws checked exceptions)
-
-