@FunctionalInterface public interface LBiConsumer<T1,T2> extends java.util.function.BiConsumer<T1,T2>, MetaConsumer, MetaInterface.NonThrowing, TeConsumer<T1,aType.a<T2>>, Codomain<aType.aVoid>, Domain2<aType.a<T1>,aType.a<T2>>
Non-throwing functional interface (lambda) LBiConsumer for Java 8.
Type: consumer
Domain (lvl: 2): T1 a1,T2 a2
Co-domain: none
Special case of consumer that corresponds to expressions like (list, element) -> List::add
| Modifier and Type | Interface and Description |
|---|---|
static class |
LBiConsumer.LBiConsumerSingle<T1,T2> |
static interface |
LBiConsumer.LObj1Obj0Cons<T2,T1>
Permutation of LBiConsumer for method references.
|
MetaInterface.NonThrowing, MetaInterface.Throwing<X>| Modifier and Type | Field and Description |
|---|---|
static String |
DESCRIPTION |
| Modifier and Type | Method and Description |
|---|---|
default void |
accept(T1 a1,
T2 a2) |
default void |
accept(T1 a1,
T2 a2,
ExWF<RuntimeException> exF) |
default void |
accept(T1 a1,
T2 a2,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
static <T1,T2> LBiConsumer<T1,T2> |
accept1st(LConsumer<T1> func)
Captures single parameter function into this interface where only 1st parameter will be used.
|
static <T1,T2> LBiConsumer<T1,T2> |
accept2nd(LConsumer<T2> func)
Captures single parameter function into this interface where only 2nd parameter will be used.
|
default void |
acceptThen(T1 a1,
T2 a2,
LConsumer<Throwable> handler) |
void |
acceptX(T1 a1,
T2 a2)
Implement this, but call accept(T1 a1,T2 a2)
|
default LBiConsumer<T1,T2> |
andThen(LBiConsumer<? super T1,? super T2> after)
Combines two LBiConsumer<T1,T2> together in a order.
|
static <T1,T2> LBiConsumer<T1,T2> |
biCons(LBiConsumer<T1,T2> lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
|
static <T1,T2> LBiConsumer<T1,T2> |
biConsThrowing(ExF<Throwable> exF) |
static <T1,T2> LBiConsumer<T1,T2> |
biConsThrowing(String message,
ExMF<Throwable> exF) |
static <T1,T2> void |
call(T1 a1,
T2 a2,
LBiConsumer<T1,T2> lambda) |
default LAction |
capture(T1 a1,
T2 a2)
Captures arguments but delays the evaluation.
|
default <V2,V3> LBiConsumer<V2,V3> |
cast()
Cast that replace generics.
|
static <V2,V3,T1,T2> |
cast(LBiConsumer<T1,T2> function)
Cast that replace generics.
|
default <V1,V2> LBiConsumer<V1,V2> |
compose(LFunction<? super V1,? extends T1> before1,
LFunction<? super V2,? extends T2> before2)
Allows to manipulate the domain of the function.
|
static <V1,V2,T1,T2> |
composed(LFunction<? super V1,? extends T1> before1,
LFunction<? super V2,? extends T2> before2,
LBiConsumer<T1,T2> after) |
static <T1,T2> void |
doNothing(T1 a1,
T2 a2)
Does nothing (LBiConsumer)
|
static <T1,T2> LBiConsumer<T1,T2> |
failSafe(LBiConsumer<T1,T2> func,
LBiConsumer<T1,T2> failSafe) |
default void |
failSafeAccept(T1 a1,
T2 a2,
LBiConsumer<T1,T2> failSafe) |
static <T1,T2> void |
failSafeAccept(T1 a1,
T2 a2,
LBiConsumer<T1,T2> func,
LBiConsumer<T1,T2> failSafe) |
static <C1,C2,T1,T2> |
forEach(IndexedRead<C1,aType.a<T1>> ia1,
C1 source1,
IndexedRead<C2,aType.a<T2>> ia2,
C2 source2,
LBiConsumer<? super T1,? super T2> consumer)
For each element (or tuple) from arguments, calls the consumer.
|
static <T1,T2> void |
fromTill(int min_i,
int max_i,
T1 a1,
T2 a2,
LBiConsumer<T1,T2> func)
From-To.
|
static <T1,T2> void |
fromTo(int min_i,
int max_i,
T1 a1,
T2 a2,
LBiConsumer<T1,T2> func)
From-To.
|
default String |
functionalInterfaceDescription()
Returns description of the functional interface.
|
default <C2> T1 |
genericForEach(T1 a1,
IndexedRead<C2,aType.a<T2>> ia2,
C2 source2)
ITERATION: TE_CONSUMER_GEN_IA: FOR, [SourcePurpose{arg=T1 a1, type=CONST}, SourcePurpose{arg=T2 a2, type=IA}]
|
default <C2,I2> T1 |
genericIterate(T1 a1,
SequentialRead<C2,I2,aType.a<T2>> sa2,
C2 source2)
ITERATION: TE_CONSUMER_GEN_SA: WHILE, [SourcePurpose{arg=T1 a1, type=CONST}, SourcePurpose{arg=T2 a2, type=SA}]
|
default LBiConsumer<T1,T2> |
handling(HandlingInstructions<Throwable,RuntimeException> handling) |
default void |
handlingAccept(T1 a1,
T2 a2,
HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
|
static <T1,T2> void |
handlingAccept(T1 a1,
T2 a2,
LBiConsumer<T1,T2> func,
HandlingInstructions<Throwable,RuntimeException> handling) |
static <C1,C2,I2,T1,T2> |
iterate(IndexedRead<C1,aType.a<T1>> ia1,
C1 source1,
SequentialRead<C2,I2,aType.a<T2>> sa2,
C2 source2,
LBiConsumer<? super T1,? super T2> consumer)
For each element (or tuple) from arguments, calls the consumer.
|
static <C1,I1,C2,T1,T2> |
iterate(SequentialRead<C1,I1,aType.a<T1>> sa1,
C1 source1,
IndexedRead<C2,aType.a<T2>> ia2,
C2 source2,
LBiConsumer<? super T1,? super T2> consumer)
For each element (or tuple) from arguments, calls the consumer.
|
static <C1,I1,C2,I2,T1,T2> |
iterate(SequentialRead<C1,I1,aType.a<T1>> sa1,
C1 source1,
SequentialRead<C2,I2,aType.a<T2>> sa2,
C2 source2,
LBiConsumer<? super T1,? super T2> consumer)
For each element (or tuple) from arguments, calls the consumer.
|
default LConsumer<T2> |
lShrink(LFunction<T2,T1> left) |
default LConsumer<T2> |
lShrinkc(T1 a1) |
static <T2,T1> LConsumer<T2> |
lShrinked(LFunction<T2,T1> left,
LBiConsumer<T1,T2> func) |
static <T2,T1> LConsumer<T2> |
lShrinkedc(T1 a1,
LBiConsumer<T1,T2> func) |
default void |
nestingAccept(T1 a1,
T2 a2)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
|
static <T2,T1> LBiConsumer.LObj1Obj0Cons<T2,T1> |
obj1Obj0Cons(LBiConsumer.LObj1Obj0Cons<T2,T1> lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
|
static <C,T1,T2> int |
pairForEach(IndexedRead<C,aType.a<? extends Object>> ia,
C s,
LBiConsumer<T1,T2> consumer) |
static <C,I,T1,T2> |
pairIterate(SequentialRead<C,I,aType.a<? extends Object>> sa,
C s,
LBiConsumer<T1,T2> consumer) |
static <T1,T2> LBiConsumer<T1,T2> |
recursive(LFunction<LBiConsumer<T1,T2>,LBiConsumer<T1,T2>> selfLambda) |
default LConsumer<T1> |
rShrink(LFunction<T1,T2> right) |
default LConsumer<T1> |
rShrinkc(T2 a2) |
static <T1,T2> LConsumer<T1> |
rShrinked(LFunction<T1,T2> right,
LBiConsumer<T1,T2> func) |
static <T1,T2> LConsumer<T1> |
rShrinkedc(T2 a2,
LBiConsumer<T1,T2> func) |
static <T1,T2> LBiConsumer<T1,T2> |
safe()
Safe instance.
|
static <T1,T2> LBiConsumer<T1,T2> |
safe(LBiConsumer<T1,T2> other)
Safe wrapping.
|
static <T1,T2> LSupplier<LBiConsumer<T1,T2>> |
safeSupplier()
Safe instance supplier.
|
static <T1,T2> LSupplier<LBiConsumer<T1,T2>> |
safeSupplier(LSupplier<LBiConsumer<T1,T2>> supplier)
Safe supplier.
|
default void |
shovingAccept(T1 a1,
T2 a2)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
|
static <T1,C2,T2> T1 |
targetedForEach(T1 a1,
IndexedRead<C2,aType.a<T2>> ia2,
C2 source2,
LBiConsumer<? super T1,? super T2> consumer)
For each element (or tuple) from arguments, calls the consumer.
|
static <T1,C2,I2,T2> |
targetedIterate(T1 a1,
SequentialRead<C2,I2,aType.a<T2>> sa2,
C2 source2,
LBiConsumer<? super T1,? super T2> consumer)
For each element (or tuple) from arguments, calls the consumer.
|
static <T1,T2> void |
times(int max_i,
T1 a1,
T2 a2,
LBiConsumer<T1,T2> func)
From-To.
|
static <T1,T2> void |
tryAccept(T1 a1,
T2 a2,
LBiConsumer<T1,T2> func) |
static <T1,T2> void |
tryAccept(T1 a1,
T2 a2,
LBiConsumer<T1,T2> func,
ExWF<RuntimeException> exF) |
static <T1,T2> void |
tryAccept(T1 a1,
T2 a2,
LBiConsumer<T1,T2> func,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
static <T1,T2> void |
tryAcceptThen(T1 a1,
T2 a2,
LBiConsumer<T1,T2> func,
LConsumer<Throwable> handler) |
default LBiConsumer<T1,T2> |
trying(ExWF<RuntimeException> exF) |
default LBiConsumer<T1,T2> |
trying(ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default LBiConsumer<T1,T2> |
tryingThen(LConsumer<Throwable> handler) |
default LTuple.Void |
tupleAccept(LPair<T1,T2> args) |
static <T1,T2> LBiConsumer<T1,T2> |
uncurry(LFunction<T1,LConsumer<T2>> func) |
default LBiConsumer |
untyped()
Cast that removes generics.
|
static <T1,T2> LBiConsumer<T1,T2> |
wrap(java.util.function.BiConsumer<T1,T2> other)
Wraps JRE instance.
|
andThenisThrowingisConsumerformatTo, isAction, isFunction, isOperator, isPredicate, isSupplierstatic final String DESCRIPTION
default void accept(T1 a1, T2 a2)
accept in interface java.util.function.BiConsumer<T1,T2>void acceptX(T1 a1, T2 a2) throws Throwable
Implement this, but call accept(T1 a1,T2 a2)
Throwabledefault LTuple.Void tupleAccept(LPair<T1,T2> args)
default void handlingAccept(T1 a1, T2 a2, HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
default LBiConsumer<T1,T2> handling(HandlingInstructions<Throwable,RuntimeException> handling)
default void accept(T1 a1, T2 a2, @Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default LBiConsumer<T1,T2> trying(@Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default void accept(T1 a1, T2 a2, @Nonnull ExWF<RuntimeException> exF)
default LBiConsumer<T1,T2> trying(@Nonnull ExWF<RuntimeException> exF)
default void nestingAccept(T1 a1, T2 a2)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
default void shovingAccept(T1 a1, T2 a2)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
static <T1,T2> void handlingAccept(T1 a1,
T2 a2,
LBiConsumer<T1,T2> func,
HandlingInstructions<Throwable,RuntimeException> handling)
static <T1,T2> void tryAccept(T1 a1,
T2 a2,
LBiConsumer<T1,T2> func)
static <T1,T2> void tryAccept(T1 a1,
T2 a2,
LBiConsumer<T1,T2> func,
@Nonnull
ExWMF<RuntimeException> exF,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
static <T1,T2> void tryAccept(T1 a1,
T2 a2,
LBiConsumer<T1,T2> func,
@Nonnull
ExWF<RuntimeException> exF)
static <T1,T2> void tryAcceptThen(T1 a1,
T2 a2,
LBiConsumer<T1,T2> func,
@Nonnull
LConsumer<Throwable> handler)
static <T1,T2> void failSafeAccept(T1 a1,
T2 a2,
LBiConsumer<T1,T2> func,
@Nonnull
LBiConsumer<T1,T2> failSafe)
static <T1,T2> LBiConsumer<T1,T2> failSafe(LBiConsumer<T1,T2> func, @Nonnull LBiConsumer<T1,T2> failSafe)
@Nonnull default String functionalInterfaceDescription()
Returns description of the functional interface.
functionalInterfaceDescription in interface MetaFunctionalInterfacestatic <T1,T2> void fromTo(int min_i,
int max_i,
T1 a1,
T2 a2,
LBiConsumer<T1,T2> func)
From-To. Intended to be used with non-capturing lambda.
static <T1,T2> void fromTill(int min_i,
int max_i,
T1 a1,
T2 a2,
LBiConsumer<T1,T2> func)
From-To. Intended to be used with non-capturing lambda.
static <T1,T2> void times(int max_i,
T1 a1,
T2 a2,
LBiConsumer<T1,T2> func)
From-To. Intended to be used with non-capturing lambda.
static <T2,T1> LConsumer<T2> lShrinked(LFunction<T2,T1> left, LBiConsumer<T1,T2> func)
static <T2,T1> LConsumer<T2> lShrinkedc(T1 a1, LBiConsumer<T1,T2> func)
static <T1,T2> LConsumer<T1> rShrinked(LFunction<T1,T2> right, LBiConsumer<T1,T2> func)
static <T1,T2> LConsumer<T1> rShrinkedc(T2 a2, LBiConsumer<T1,T2> func)
static <T1,T2> LBiConsumer<T1,T2> uncurry(LFunction<T1,LConsumer<T2>> func)
default LBiConsumer untyped()
Cast that removes generics.
default <V2,V3> LBiConsumer<V2,V3> cast()
Cast that replace generics.
static <V2,V3,T1,T2> LBiConsumer<V2,V3> cast(LBiConsumer<T1,T2> function)
Cast that replace generics.
@Nonnull static <T1,T2> LBiConsumer<T1,T2> accept1st(@Nonnull LConsumer<T1> func)
Captures single parameter function into this interface where only 1st parameter will be used.
@Nonnull static <T1,T2> LBiConsumer<T1,T2> accept2nd(@Nonnull LConsumer<T2> func)
Captures single parameter function into this interface where only 2nd parameter will be used.
@Nonnull static <T1,T2> LBiConsumer<T1,T2> biCons(@Nonnull LBiConsumer<T1,T2> lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
@Nonnull static <T1,T2> LBiConsumer<T1,T2> recursive(@Nonnull LFunction<LBiConsumer<T1,T2>,LBiConsumer<T1,T2>> selfLambda)
@Nonnull static <T1,T2> LBiConsumer<T1,T2> biConsThrowing(@Nonnull ExF<Throwable> exF)
@Nonnull static <T1,T2> LBiConsumer<T1,T2> biConsThrowing(String message, @Nonnull ExMF<Throwable> exF)
@Nonnull static <T2,T1> LBiConsumer.LObj1Obj0Cons<T2,T1> obj1Obj0Cons(@Nonnull LBiConsumer.LObj1Obj0Cons<T2,T1> lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
static <T1,T2> void call(T1 a1,
T2 a2,
@Nonnull
LBiConsumer<T1,T2> lambda)
@Nonnull static <T1,T2> LBiConsumer<T1,T2> wrap(java.util.function.BiConsumer<T1,T2> other)
Wraps JRE instance.
@Nonnull static <T1,T2> LBiConsumer<T1,T2> safe()
Safe instance.
@Nonnull static <T1,T2> LSupplier<LBiConsumer<T1,T2>> safeSupplier()
Safe instance supplier. Returns supplier of safe() instance.
@Nonnull static <T1,T2> LBiConsumer<T1,T2> safe(@Nullable LBiConsumer<T1,T2> other)
Safe wrapping. Either argument function is returned (if it is not null) or safe() instance.
@Nonnull static <T1,T2> LSupplier<LBiConsumer<T1,T2>> safeSupplier(@Nullable LSupplier<LBiConsumer<T1,T2>> supplier)
Safe supplier. Either argument supplier is returned (if it is not null) or supplier of safe() instance.
@Nonnull default <V1,V2> LBiConsumer<V1,V2> compose(@Nonnull LFunction<? super V1,? extends T1> before1, @Nonnull LFunction<? super V2,? extends T2> before2)
Allows to manipulate the domain of the function.
static <V1,V2,T1,T2> LBiConsumer<V1,V2> composed(@Nonnull LFunction<? super V1,? extends T1> before1, @Nonnull LFunction<? super V2,? extends T2> before2, LBiConsumer<T1,T2> after)
@Nonnull default LBiConsumer<T1,T2> andThen(@Nonnull LBiConsumer<? super T1,? super T2> after)
Combines two LBiConsumer<T1,T2> together in a order.
static <T1,T2> void doNothing(T1 a1,
T2 a2)
Does nothing (LBiConsumer)
static <C1,C2,T1,T2> int forEach(IndexedRead<C1,aType.a<T1>> ia1, C1 source1, IndexedRead<C2,aType.a<T2>> ia2, C2 source2, LBiConsumer<? super T1,? super T2> consumer)
For each element (or tuple) from arguments, calls the consumer. Thread safety, fail-fast, fail-safety of this method is not expected.
static <C1,I1,C2,T1,T2> int iterate(SequentialRead<C1,I1,aType.a<T1>> sa1, C1 source1, IndexedRead<C2,aType.a<T2>> ia2, C2 source2, LBiConsumer<? super T1,? super T2> consumer)
For each element (or tuple) from arguments, calls the consumer. Thread safety, fail-fast, fail-safety of this method is not expected.
static <C1,C2,I2,T1,T2> int iterate(IndexedRead<C1,aType.a<T1>> ia1, C1 source1, SequentialRead<C2,I2,aType.a<T2>> sa2, C2 source2, LBiConsumer<? super T1,? super T2> consumer)
For each element (or tuple) from arguments, calls the consumer. Thread safety, fail-fast, fail-safety of this method is not expected.
static <C1,I1,C2,I2,T1,T2> int iterate(SequentialRead<C1,I1,aType.a<T1>> sa1, C1 source1, SequentialRead<C2,I2,aType.a<T2>> sa2, C2 source2, LBiConsumer<? super T1,? super T2> consumer)
For each element (or tuple) from arguments, calls the consumer. Thread safety, fail-fast, fail-safety of this method depends highly on the arguments.
static <T1,C2,T2> T1 targetedForEach(T1 a1,
IndexedRead<C2,aType.a<T2>> ia2,
C2 source2,
LBiConsumer<? super T1,? super T2> consumer)
For each element (or tuple) from arguments, calls the consumer. First argument is designated as ‘target’ object. Thread safety, fail-fast, fail-safety of this method is not expected.
static <T1,C2,I2,T2> T1 targetedIterate(T1 a1,
SequentialRead<C2,I2,aType.a<T2>> sa2,
C2 source2,
LBiConsumer<? super T1,? super T2> consumer)
For each element (or tuple) from arguments, calls the consumer. First argument is designated as ‘target’ object. Thread safety, fail-fast, fail-safety of this method depends highly on the arguments.
default <C2> T1 genericForEach(T1 a1, IndexedRead<C2,aType.a<T2>> ia2, C2 source2)
ITERATION: TE_CONSUMER_GEN_IA: FOR, [SourcePurpose{arg=T1 a1, type=CONST}, SourcePurpose{arg=T2 a2, type=IA}]
genericForEach in interface TeConsumer<T1,aType.a<T2>>default <C2,I2> T1 genericIterate(T1 a1, SequentialRead<C2,I2,aType.a<T2>> sa2, C2 source2)
ITERATION: TE_CONSUMER_GEN_SA: WHILE, [SourcePurpose{arg=T1 a1, type=CONST}, SourcePurpose{arg=T2 a2, type=SA}]
genericIterate in interface TeConsumer<T1,aType.a<T2>>static <C,T1,T2> int pairForEach(IndexedRead<C,aType.a<? extends Object>> ia, C s, LBiConsumer<T1,T2> consumer)
static <C,I,T1,T2> int pairIterate(SequentialRead<C,I,aType.a<? extends Object>> sa, C s, LBiConsumer<T1,T2> consumer)
Copyright © 2019. All rights reserved.