T - the type of the first argument to the operationU - the type of the second argument to the operationE - the type of the thrown checked exception@FunctionalInterface public interface ThrowingBiConsumer<T,U,E extends Exception>
ThrowingConsumer.
Unlike most other functional interfaces, ThrowingBiConsumer is expected
to operate via side-effects.ThrowingConsumer| Modifier and Type | Method and Description |
|---|---|
void |
accept(T t,
U u) |
default ThrowingBiConsumer<T,U,E> |
andThenConsume(ThrowingBiConsumer<? super T,? super U,? extends E> after) |
default ThrowingBiFunction<T,U,Void,E> |
asFunction()
Returns this ThrowingBiConsumer instance as a ThrowingBiFunction
|
static <T,U> BiConsumer<T,U> |
sneaky(ThrowingBiConsumer<T,U,?> consumer)
Returns a new BiConsumer instance which rethrows the checked exception using the Sneaky Throws pattern
|
default BiConsumer<T,U> |
uncheck()
Returns a new BiConsumer instance which wraps thrown checked exception instance into a RuntimeException
|
static <T,U> BiConsumer<T,U> |
unchecked(ThrowingBiConsumer<T,U,?> consumer) |
default ThrowingBiConsumer<T,U,E> andThenConsume(ThrowingBiConsumer<? super T,? super U,? extends E> after)
default ThrowingBiFunction<T,U,Void,E> asFunction()
static <T,U> BiConsumer<T,U> unchecked(ThrowingBiConsumer<T,U,?> consumer)
static <T,U> BiConsumer<T,U> sneaky(ThrowingBiConsumer<T,U,?> consumer)
default BiConsumer<T,U> uncheck()
Copyright © 2020. All rights reserved.