Package org.n52.janmayen.function
Interface ThrowingBiConsumer<A,B,X extends Exception>
- Type Parameters:
A- the type of the first argument to the operationB- the type of the second argument to the operationX- the type of the exception that might be thrown
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Represents an operation that accepts two input arguments and returns no result. This is the two-arity specialization
of
Consumer. Unlike most other functional interfaces, BiConsumer is expected to operate via
side-effects.-
Method Summary
Modifier and TypeMethodDescriptionvoidPerforms this operation on the given arguments.default ThrowingBiConsumer<A, B, X> andThen(ThrowingBiConsumer<? super A, ? super B, ? extends X> after) Returns a composedBiConsumerthat performs, in sequence, this operation followed by theafteroperation.default ThrowingConsumer<B, X> curryFirst(A t) Get aThrowingConsumerby currying the first parameter.default ThrowingConsumer<A, X> currySecond(B u) GetThrowingConsumerby currying the second parameter.default <T> ThrowingBiConsumer<T, B, X> mapFirst(ThrowingFunction<? super T, ? extends A, X> fun) Change the first parameter using the supplied mapper.default <T> ThrowingBiConsumer<A, T, X> mapSecond(ThrowingFunction<? super T, ? extends B, X> fun) Change the second parameter using the supplied mapper.
-
Method Details
-
accept
Performs this operation on the given arguments.- Parameters:
t- the first input argumentu- the second input argument- Throws:
X- if the operation fails
-
andThen
default ThrowingBiConsumer<A,B, andThenX> (ThrowingBiConsumer<? super A, ? super B, ? extends X> after) Returns a composedBiConsumerthat performs, in sequence, this operation followed by theafteroperation. If performing either operation throws an exception, it is relayed to the caller of the composed operation. If performing this operation throws an exception, theafteroperation will not be performed.- Parameters:
after- the operation to perform after this operation- Returns:
- a composed
BiConsumerthat performs in sequence this operation followed by theafteroperation - Throws:
NullPointerException- ifafteris null
-
curryFirst
Get aThrowingConsumerby currying the first parameter.- Parameters:
t- the constant parameter- Returns:
- the consumer
-
currySecond
GetThrowingConsumerby currying the second parameter.- Parameters:
u- the constant parameter- Returns:
- the consumer
-
mapFirst
Change the first parameter using the supplied mapper.- Type Parameters:
T- the new type of the first parameter- Parameters:
fun- the mapper- Returns:
- the consumer
-
mapSecond
Change the second parameter using the supplied mapper.- Type Parameters:
T- the new type of the second parameter- Parameters:
fun- the mapper- Returns:
- the consumer
-