T
- the type of the first argument to the operationU
- the type of the second argument to the operationE
- the type of exceptions that can be thrown by the operation@FunctionalInterface public interface BiThrowingConsumer<T,U,E extends Throwable>
BiThrowingConsumer
interface expands on the BiConsumer
interface to provide the ability to throw back exceptions.
This code is experimental. While this interface is functional and tested, it may change or be removed in a future version of the library.
Modifier and Type | Method and Description |
---|---|
void |
accept(T t,
U u)
Performs this operation on the given arguments.
|
default BiThrowingConsumer<T,U,E> |
andThen(BiThrowingConsumer<? super T,? super U,E> after)
Returns a composed
BiThrowingConsumer that performs, in sequence, this operation
followed by the after operation. |
void accept(T t, U u) throws E extends Throwable
default BiThrowingConsumer<T,U,E> andThen(BiThrowingConsumer<? super T,? super U,E> after) throws E extends Throwable
BiThrowingConsumer
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 operationBiThrowingConsumer
that performs in sequence this operation followed
by the after
operationIllegalArgumentException
- if after
is null
E
- if an error occursE extends Throwable
This work is licensed under a Creative Commons Attribution 4.0 International License.