@FunctionalInterface public interface LObjSrtConsumer<T> extends MetaConsumer, MetaInterface.NonThrowing, TeConsumer<T,aType.aShort>, Codomain<aType.aVoid>, Domain2<aType.a<T>,aType.aShort>
Non-throwing functional interface (lambda) LObjSrtConsumer for Java 8.
Type: consumer
Domain (lvl: 2): T a1,short 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 |
LObjSrtConsumer.LObjSrtConsumerSingle<T> |
static interface |
LObjSrtConsumer.LSrtObjCons<T>
Permutation of LObjSrtConsumer 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(T a1,
short a2) |
default void |
accept(T a1,
short a2,
ExWF<RuntimeException> exF) |
default void |
accept(T a1,
short a2,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
static <T> LObjSrtConsumer<T> |
accept1st(LConsumer<T> func)
Captures single parameter function into this interface where only 1st parameter will be used.
|
static <T> LObjSrtConsumer<T> |
accept2nd(LSrtConsumer func)
Captures single parameter function into this interface where only 2nd parameter will be used.
|
default void |
acceptThen(T a1,
short a2,
LConsumer<Throwable> handler) |
void |
acceptX(T a1,
short a2)
Implement this, but call accept(T a1,short a2)
|
default LObjSrtConsumer<T> |
andThen(LObjSrtConsumer<? super T> after)
Combines two LObjSrtConsumer
|
static <T> void |
call(T a1,
short a2,
LObjSrtConsumer<T> lambda) |
default LAction |
capture(T a1,
short a2)
Captures arguments but delays the evaluation.
|
default <V2> LObjSrtConsumer<V2> |
cast()
Cast that replace generics.
|
static <V2,T> LObjSrtConsumer<V2> |
cast(LObjSrtConsumer<T> function)
Cast that replace generics.
|
default <V1> LObjSrtConsumer<V1> |
compose(LFunction<? super V1,? extends T> before1,
LSrtUnaryOperator before2)
Allows to manipulate the domain of the function.
|
static <V1,T> LObjSrtConsumer<V1> |
composed(LFunction<? super V1,? extends T> before1,
LSrtUnaryOperator before2,
LObjSrtConsumer<T> after) |
static <V1,V2,T> LBiConsumer<V1,V2> |
composed(LFunction<? super V1,? extends T> before1,
LToSrtFunction<? super V2> before2,
LObjSrtConsumer<T> after) |
static <T> void |
doNothing(short a2,
T a1)
Does nothing (LObjSrtConsumer.LSrtObjCons)
|
static <T> void |
doNothing(T a1,
short a2)
Does nothing (LObjSrtConsumer)
|
static <T> LObjSrtConsumer<T> |
failSafe(LObjSrtConsumer<T> func,
LObjSrtConsumer<T> failSafe) |
default void |
failSafeAccept(T a1,
short a2,
LObjSrtConsumer<T> failSafe) |
static <T> void |
failSafeAccept(T a1,
short a2,
LObjSrtConsumer<T> func,
LObjSrtConsumer<T> failSafe) |
static <C1,C2,T> int |
forEach(IndexedRead<C1,aType.a<T>> ia1,
C1 source1,
IndexedRead<C2,aType.aShort> ia2,
C2 source2,
LObjSrtConsumer<? super T> consumer)
For each element (or tuple) from arguments, calls the consumer.
|
static <T> void |
fromTill(int min_i,
int max_i,
T a1,
short a2,
LObjSrtConsumer<T> func)
From-To.
|
static <T> void |
fromTo(int min_i,
int max_i,
T a1,
short a2,
LObjSrtConsumer<T> func)
From-To.
|
default String |
functionalInterfaceDescription()
Returns description of the functional interface.
|
default <C2> T |
genericForEach(T a1,
IndexedRead<C2,aType.aShort> ia2,
C2 source2)
ITERATION: TE_CONSUMER_GEN_IA: FOR, [SourcePurpose{arg=T a1, type=CONST}, SourcePurpose{arg=short a2, type=IA}]
|
default <C2,I2> T |
genericIterate(T a1,
SequentialRead<C2,I2,aType.aShort> sa2,
C2 source2)
ITERATION: TE_CONSUMER_GEN_SA: WHILE, [SourcePurpose{arg=T a1, type=CONST}, SourcePurpose{arg=short a2, type=SA}]
|
default LObjSrtConsumer<T> |
handling(HandlingInstructions<Throwable,RuntimeException> handling) |
default void |
handlingAccept(T a1,
short a2,
HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
|
static <T> void |
handlingAccept(T a1,
short a2,
LObjSrtConsumer<T> func,
HandlingInstructions<Throwable,RuntimeException> handling) |
static <C1,C2,I2,T> |
iterate(IndexedRead<C1,aType.a<T>> ia1,
C1 source1,
SequentialRead<C2,I2,aType.aShort> sa2,
C2 source2,
LObjSrtConsumer<? super T> consumer)
For each element (or tuple) from arguments, calls the consumer.
|
static <C1,I1,C2,T> |
iterate(SequentialRead<C1,I1,aType.a<T>> sa1,
C1 source1,
IndexedRead<C2,aType.aShort> ia2,
C2 source2,
LObjSrtConsumer<? super T> consumer)
For each element (or tuple) from arguments, calls the consumer.
|
static <C1,I1,C2,I2,T> |
iterate(SequentialRead<C1,I1,aType.a<T>> sa1,
C1 source1,
SequentialRead<C2,I2,aType.aShort> sa2,
C2 source2,
LObjSrtConsumer<? super T> consumer)
For each element (or tuple) from arguments, calls the consumer.
|
default LSrtConsumer |
lShrink(LSrtFunction<T> left) |
default LSrtConsumer |
lShrinkc(T a1) |
static <T> LSrtConsumer |
lShrinked(LSrtFunction<T> left,
LObjSrtConsumer<T> func) |
static <T> LSrtConsumer |
lShrinkedc(T a1,
LObjSrtConsumer<T> func) |
default void |
nestingAccept(T a1,
short a2)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
|
static <T> LObjSrtConsumer<T> |
objSrtCons(LObjSrtConsumer<T> lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
|
default <V1,V2> LBiConsumer<V1,V2> |
objSrtConsCompose(LFunction<? super V1,? extends T> before1,
LToSrtFunction<? super V2> before2)
Allows to manipulate the domain of the function.
|
static <T> LObjSrtConsumer<T> |
objSrtConsThrowing(ExF<Throwable> exF) |
static <T> LObjSrtConsumer<T> |
objSrtConsThrowing(String message,
ExMF<Throwable> exF) |
static <T> LObjSrtConsumer<T> |
recursive(LFunction<LObjSrtConsumer<T>,LObjSrtConsumer<T>> selfLambda) |
default LConsumer<T> |
rShrink(LToSrtFunction<T> right) |
default LConsumer<T> |
rShrinkc(short a2) |
static <T> LConsumer<T> |
rShrinked(LToSrtFunction<T> right,
LObjSrtConsumer<T> func) |
static <T> LConsumer<T> |
rShrinkedc(short a2,
LObjSrtConsumer<T> func) |
static <T> LObjSrtConsumer<T> |
safe()
Safe instance.
|
static <T> LObjSrtConsumer<T> |
safe(LObjSrtConsumer<T> other)
Safe wrapping.
|
static <T> LSupplier<LObjSrtConsumer<T>> |
safeSupplier()
Safe instance supplier.
|
static <T> LSupplier<LObjSrtConsumer<T>> |
safeSupplier(LSupplier<LObjSrtConsumer<T>> supplier)
Safe supplier.
|
default void |
shovingAccept(T a1,
short a2)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
|
static <T> LObjSrtConsumer.LSrtObjCons<T> |
srtObjCons(LObjSrtConsumer.LSrtObjCons<T> lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
|
static <T,C2> T |
targetedForEach(T a1,
IndexedRead<C2,aType.aShort> ia2,
C2 source2,
LObjSrtConsumer<? super T> consumer)
For each element (or tuple) from arguments, calls the consumer.
|
static <T,C2,I2> T |
targetedIterate(T a1,
SequentialRead<C2,I2,aType.aShort> sa2,
C2 source2,
LObjSrtConsumer<? super T> consumer)
For each element (or tuple) from arguments, calls the consumer.
|
static <T> void |
times(int max_i,
T a1,
short a2,
LObjSrtConsumer<T> func)
From-To.
|
static <T> void |
tryAccept(T a1,
short a2,
LObjSrtConsumer<T> func) |
static <T> void |
tryAccept(T a1,
short a2,
LObjSrtConsumer<T> func,
ExWF<RuntimeException> exF) |
static <T> void |
tryAccept(T a1,
short a2,
LObjSrtConsumer<T> func,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
static <T> void |
tryAcceptThen(T a1,
short a2,
LObjSrtConsumer<T> func,
LConsumer<Throwable> handler) |
default LObjSrtConsumer<T> |
trying(ExWF<RuntimeException> exF) |
default LObjSrtConsumer<T> |
trying(ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default LObjSrtConsumer<T> |
tryingThen(LConsumer<Throwable> handler) |
default LTuple.Void |
tupleAccept(LObjSrtPair<T> args) |
static <T> LObjSrtConsumer<T> |
uncurry(LFunction<T,LSrtConsumer> func) |
default LObjSrtConsumer |
untyped()
Cast that removes generics.
|
isThrowingisConsumerformatTo, isAction, isFunction, isOperator, isPredicate, isSupplierstatic final String DESCRIPTION
default void accept(T a1, short a2)
void acceptX(T a1, short a2) throws Throwable
Implement this, but call accept(T a1,short a2)
Throwabledefault LTuple.Void tupleAccept(LObjSrtPair<T> args)
default void handlingAccept(T a1, short a2, HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
default LObjSrtConsumer<T> handling(HandlingInstructions<Throwable,RuntimeException> handling)
default void accept(T a1, short a2, @Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default LObjSrtConsumer<T> trying(@Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default void accept(T a1, short a2, @Nonnull ExWF<RuntimeException> exF)
default LObjSrtConsumer<T> trying(@Nonnull ExWF<RuntimeException> exF)
default LObjSrtConsumer<T> tryingThen(@Nonnull LConsumer<Throwable> handler)
default void nestingAccept(T a1, short a2)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
default void shovingAccept(T a1, short a2)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
static <T> void handlingAccept(T a1,
short a2,
LObjSrtConsumer<T> func,
HandlingInstructions<Throwable,RuntimeException> handling)
static <T> void tryAccept(T a1,
short a2,
LObjSrtConsumer<T> func)
static <T> void tryAccept(T a1,
short a2,
LObjSrtConsumer<T> func,
@Nonnull
ExWMF<RuntimeException> exF,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
static <T> void tryAccept(T a1,
short a2,
LObjSrtConsumer<T> func,
@Nonnull
ExWF<RuntimeException> exF)
static <T> void tryAcceptThen(T a1,
short a2,
LObjSrtConsumer<T> func,
@Nonnull
LConsumer<Throwable> handler)
default void failSafeAccept(T a1, short a2, @Nonnull LObjSrtConsumer<T> failSafe)
static <T> void failSafeAccept(T a1,
short a2,
LObjSrtConsumer<T> func,
@Nonnull
LObjSrtConsumer<T> failSafe)
static <T> LObjSrtConsumer<T> failSafe(LObjSrtConsumer<T> func, @Nonnull LObjSrtConsumer<T> failSafe)
@Nonnull default String functionalInterfaceDescription()
Returns description of the functional interface.
functionalInterfaceDescription in interface MetaFunctionalInterfacestatic <T> void fromTo(int min_i,
int max_i,
T a1,
short a2,
LObjSrtConsumer<T> func)
From-To. Intended to be used with non-capturing lambda.
static <T> void fromTill(int min_i,
int max_i,
T a1,
short a2,
LObjSrtConsumer<T> func)
From-To. Intended to be used with non-capturing lambda.
static <T> void times(int max_i,
T a1,
short a2,
LObjSrtConsumer<T> func)
From-To. Intended to be used with non-capturing lambda.
default LSrtConsumer lShrink(LSrtFunction<T> left)
default LSrtConsumer lShrinkc(T a1)
static <T> LSrtConsumer lShrinked(LSrtFunction<T> left, LObjSrtConsumer<T> func)
static <T> LSrtConsumer lShrinkedc(T a1, LObjSrtConsumer<T> func)
default LConsumer<T> rShrink(LToSrtFunction<T> right)
static <T> LConsumer<T> rShrinked(LToSrtFunction<T> right, LObjSrtConsumer<T> func)
static <T> LConsumer<T> rShrinkedc(short a2, LObjSrtConsumer<T> func)
static <T> LObjSrtConsumer<T> uncurry(LFunction<T,LSrtConsumer> func)
default LObjSrtConsumer untyped()
Cast that removes generics.
default <V2> LObjSrtConsumer<V2> cast()
Cast that replace generics.
static <V2,T> LObjSrtConsumer<V2> cast(LObjSrtConsumer<T> function)
Cast that replace generics.
@Nonnull static <T> LObjSrtConsumer<T> accept1st(@Nonnull LConsumer<T> func)
Captures single parameter function into this interface where only 1st parameter will be used.
@Nonnull static <T> LObjSrtConsumer<T> accept2nd(@Nonnull LSrtConsumer func)
Captures single parameter function into this interface where only 2nd parameter will be used.
@Nonnull static <T> LObjSrtConsumer<T> objSrtCons(@Nonnull LObjSrtConsumer<T> lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
@Nonnull static <T> LObjSrtConsumer<T> recursive(@Nonnull LFunction<LObjSrtConsumer<T>,LObjSrtConsumer<T>> selfLambda)
@Nonnull static <T> LObjSrtConsumer<T> objSrtConsThrowing(@Nonnull ExF<Throwable> exF)
@Nonnull static <T> LObjSrtConsumer<T> objSrtConsThrowing(String message, @Nonnull ExMF<Throwable> exF)
@Nonnull static <T> LObjSrtConsumer.LSrtObjCons<T> srtObjCons(@Nonnull LObjSrtConsumer.LSrtObjCons<T> lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
static <T> void call(T a1,
short a2,
@Nonnull
LObjSrtConsumer<T> lambda)
@Nonnull static <T> LObjSrtConsumer<T> safe()
Safe instance.
@Nonnull static <T> LSupplier<LObjSrtConsumer<T>> safeSupplier()
Safe instance supplier. Returns supplier of safe() instance.
@Nonnull static <T> LObjSrtConsumer<T> safe(@Nullable LObjSrtConsumer<T> other)
Safe wrapping. Either argument function is returned (if it is not null) or safe() instance.
@Nonnull static <T> LSupplier<LObjSrtConsumer<T>> safeSupplier(@Nullable LSupplier<LObjSrtConsumer<T>> supplier)
Safe supplier. Either argument supplier is returned (if it is not null) or supplier of safe() instance.
@Nonnull default <V1> LObjSrtConsumer<V1> compose(@Nonnull LFunction<? super V1,? extends T> before1, @Nonnull LSrtUnaryOperator before2)
Allows to manipulate the domain of the function.
static <V1,T> LObjSrtConsumer<V1> composed(@Nonnull LFunction<? super V1,? extends T> before1, @Nonnull LSrtUnaryOperator before2, LObjSrtConsumer<T> after)
@Nonnull default <V1,V2> LBiConsumer<V1,V2> objSrtConsCompose(@Nonnull LFunction<? super V1,? extends T> before1, @Nonnull LToSrtFunction<? super V2> before2)
Allows to manipulate the domain of the function.
static <V1,V2,T> LBiConsumer<V1,V2> composed(@Nonnull LFunction<? super V1,? extends T> before1, @Nonnull LToSrtFunction<? super V2> before2, LObjSrtConsumer<T> after)
@Nonnull default LObjSrtConsumer<T> andThen(@Nonnull LObjSrtConsumer<? super T> after)
Combines two LObjSrtConsumer
static <T> void doNothing(T a1,
short a2)
Does nothing (LObjSrtConsumer)
static <T> void doNothing(short a2,
T a1)
Does nothing (LObjSrtConsumer.LSrtObjCons)
static <C1,C2,T> int forEach(IndexedRead<C1,aType.a<T>> ia1, C1 source1, IndexedRead<C2,aType.aShort> ia2, C2 source2, LObjSrtConsumer<? super T> 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,T> int iterate(SequentialRead<C1,I1,aType.a<T>> sa1, C1 source1, IndexedRead<C2,aType.aShort> ia2, C2 source2, LObjSrtConsumer<? super T> 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,T> int iterate(IndexedRead<C1,aType.a<T>> ia1, C1 source1, SequentialRead<C2,I2,aType.aShort> sa2, C2 source2, LObjSrtConsumer<? super T> 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,T> int iterate(SequentialRead<C1,I1,aType.a<T>> sa1, C1 source1, SequentialRead<C2,I2,aType.aShort> sa2, C2 source2, LObjSrtConsumer<? super T> 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 <T,C2> T targetedForEach(T a1,
IndexedRead<C2,aType.aShort> ia2,
C2 source2,
LObjSrtConsumer<? super T> 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 <T,C2,I2> T targetedIterate(T a1,
SequentialRead<C2,I2,aType.aShort> sa2,
C2 source2,
LObjSrtConsumer<? super T> 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> T genericForEach(T a1, IndexedRead<C2,aType.aShort> ia2, C2 source2)
ITERATION: TE_CONSUMER_GEN_IA: FOR, [SourcePurpose{arg=T a1, type=CONST}, SourcePurpose{arg=short a2, type=IA}]
genericForEach in interface TeConsumer<T,aType.aShort>default <C2,I2> T genericIterate(T a1, SequentialRead<C2,I2,aType.aShort> sa2, C2 source2)
ITERATION: TE_CONSUMER_GEN_SA: WHILE, [SourcePurpose{arg=T a1, type=CONST}, SourcePurpose{arg=short a2, type=SA}]
genericIterate in interface TeConsumer<T,aType.aShort>Copyright © 2019. All rights reserved.