-
- All Superinterfaces:
java.util.function.BiConsumer<T1,T2>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface Consumer2<T1,T2> extends java.util.function.BiConsumer<T1,T2>A consumer with 2 arguments.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidaccept(Tuple2<? extends T1,? extends T2> args)Performs this operation on the given argument.voidaccept(T1 v1, T2 v2)Performs this operation on the given argument.default Consumer1<T2>acceptPartially(Tuple1<? extends T1> args)Let this consumer partially accept the arguments.default Consumer0acceptPartially(Tuple2<? extends T1,? extends T2> args)Let this consumer partially accept the arguments.default Consumer1<T2>acceptPartially(T1 v1)Let this consumer partially accept the arguments.default Consumer0acceptPartially(T1 v1, T2 v2)Let this consumer partially accept the arguments.static <T1,T2>
Consumer2<T1,T2>from(java.util.function.BiConsumer<? super T1,? super T2> consumer)Convert to this consumer to aBiConsumer.default java.util.function.BiConsumer<T1,T2>toBiConsumer()Convert this consumer to aBiConsumer.
-
-
-
Method Detail
-
accept
default void accept(Tuple2<? extends T1,? extends T2> args)
Performs this operation on the given argument.- Parameters:
args- The arguments as a tuple.
-
toBiConsumer
default java.util.function.BiConsumer<T1,T2> toBiConsumer()
Convert this consumer to aBiConsumer.
-
from
static <T1,T2> Consumer2<T1,T2> from(java.util.function.BiConsumer<? super T1,? super T2> consumer)
Convert to this consumer to aBiConsumer.
-
acceptPartially
default Consumer1<T2> acceptPartially(T1 v1)
Let this consumer partially accept the arguments.
-
acceptPartially
default Consumer0 acceptPartially(T1 v1, T2 v2)
Let this consumer partially accept the arguments.
-
acceptPartially
default Consumer1<T2> acceptPartially(Tuple1<? extends T1> args)
Let this consumer partially accept the arguments.
-
-