A
- the type of the first argument of the consumerB
- the type of the second argument of the consumer@ConsumerType
@FunctionalInterface
public interface ThrowableBiConsumer<A,B>
BiConsumer
that can throw an exception.
This interface can be implemented with a lambda function.
Modifier and Type | Method and Description |
---|---|
void |
accept(A a,
B b)
Operates with two parameters and returns
void . |
default ThrowableBiConsumer<A,B> |
andThen(ThrowableBiConsumer<? super A,? super B> after)
Returns the
ThrowableBiConsumer function that first executes the
current ThrowableBiConsumer instance's accept method,
then executes the after parameter's accept method. |
static <A,B> ThrowableBiConsumer<A,B> |
empty()
Returns an empty
ThrowableBiConsumer that doesn't perform any
operation. |
static <A,B> ThrowableBiConsumer<A,B> empty()
ThrowableBiConsumer
that doesn't perform any
operation.ThrowableBiConsumer
that doesn't perform any
operationvoid accept(A a, B b) throws java.lang.Exception
void
. This function can
be implemented explicitly or with a lambda.a
- the first function argumentb
- the second function argumentjava.lang.Exception
default ThrowableBiConsumer<A,B> andThen(ThrowableBiConsumer<? super A,? super B> after)
ThrowableBiConsumer
function that first executes the
current ThrowableBiConsumer
instance's accept
method,
then executes the after
parameter's accept
method.after
- the ThrowableBiConsumer
instance to execute after
the current instanceThrowableBiConsumer
that executes the current
instance's accept
method, as well as that of after