Interface ThrowingConsumer2<A,B,T extends Throwable>
- Type Parameters:
A- The 1st input argument type to be consumedB- The 2nd input argument type to be consumedT- The type ofThrowablethrown by the consumer
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A better version of Java's
BiConsumer interface that
allows for the consumers to throw whatever Throwable
is specified.- Version:
- 0.1-Alpha-SNAPSHOT
- Author:
- Logan Ferree (Tadukoo)
-
Method Summary
Modifier and TypeMethodDescriptionvoidTakes two arguments and consumes them.default ThrowingConsumer2<A,B, T> andThen(ThrowingConsumer2<? super A, ? super B, ? extends T> after) Creates a ThrowingConsumer2 that runs this ThrowingConsumer2 and then also runs the given ThrowingConsumer2 on the same arguments.
-
Method Details
-
accept
Takes two arguments and consumes them.- Parameters:
a- The 1st argumentb- The 2nd argument- Throws:
T- Determined by the consumer, not required
-
andThen
Creates a ThrowingConsumer2 that runs this ThrowingConsumer2 and then also runs the given ThrowingConsumer2 on the same arguments.- Parameters:
after- A 2nd ThrowingConsumer2 to run the arguments on after this one- Returns:
- The ThrowingConsumer2 made from composing this one and the given one
-