@FunctionalInterface public interface LConsumer<T> extends java.util.function.Consumer<T>, MetaConsumer, MetaInterface.NonThrowing, Codomain<aType.aVoid>, Domain1<aType.a<T>>
Non-throwing functional interface (lambda) LConsumer for Java 8.
Type: consumer
Domain (lvl: 1): T a
Co-domain: none
| Modifier and Type | Interface and Description |
|---|---|
static class |
LConsumer.LConsumerSingle<T> |
MetaInterface.NonThrowing, MetaInterface.Throwing<X>| Modifier and Type | Field and Description |
|---|---|
static String |
DESCRIPTION |
| Modifier and Type | Method and Description |
|---|---|
default void |
accept(T a) |
default void |
accept(T a,
ExWF<RuntimeException> exF) |
default void |
accept(T a,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default void |
acceptThen(T a,
LConsumer<Throwable> handler) |
void |
acceptX(T a)
Implement this, but call accept(T a)
|
default LConsumer<T> |
andThen(LConsumer<? super T> after)
Combines two LConsumer
|
static <T> void |
call(T a,
LConsumer<T> lambda) |
default LAction |
capture(T a)
Captures arguments but delays the evaluation.
|
default <V2> LConsumer<V2> |
cast()
Cast that replace generics.
|
static <V2,T> LConsumer<V2> |
cast(LConsumer<T> function)
Cast that replace generics.
|
default <V> LConsumer<V> |
compose(LFunction<? super V,? extends T> before)
Allows to manipulate the domain of the function.
|
static <V,T> LConsumer<V> |
composed(LFunction<? super V,? extends T> before,
LConsumer<T> after) |
static <T> LConsumer<T> |
cons(LConsumer<T> lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
|
static <T> LConsumer<T> |
consThrowing(ExF<Throwable> exF) |
static <T> LConsumer<T> |
consThrowing(String message,
ExMF<Throwable> exF) |
static <T> void |
doNothing(T a)
Does nothing (LConsumer)
|
static <T> LConsumer<T> |
failSafe(LConsumer<T> func,
LConsumer<T> failSafe) |
default void |
failSafeAccept(T a,
LConsumer<T> failSafe) |
static <T> void |
failSafeAccept(T a,
LConsumer<T> func,
LConsumer<T> failSafe) |
static <C0,T> int |
forEach(IndexedRead<C0,aType.a<T>> ia,
C0 source,
LConsumer<? super T> consumer)
For each element (or tuple) from arguments, calls the consumer.
|
static <T> void |
fromTill(int min_i,
int max_i,
T a,
LConsumer<T> func)
From-To.
|
static <T> void |
fromTo(int min_i,
int max_i,
T a,
LConsumer<T> func)
From-To.
|
default String |
functionalInterfaceDescription()
Returns description of the functional interface.
|
default LConsumer<T> |
handling(HandlingInstructions<Throwable,RuntimeException> handling) |
default void |
handlingAccept(T a,
HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
|
static <T> void |
handlingAccept(T a,
LConsumer<T> func,
HandlingInstructions<Throwable,RuntimeException> handling) |
static <C0,I0,T> int |
iterate(SequentialRead<C0,I0,aType.a<T>> sa,
C0 source,
LConsumer<? super T> consumer)
For each element (or tuple) from arguments, calls the consumer.
|
default void |
nestingAccept(T a)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
|
static <T> LConsumer<T> |
recursive(LFunction<LConsumer<T>,LConsumer<T>> selfLambda) |
static <T> LConsumer<T> |
safe()
Safe instance.
|
static <T> LConsumer<T> |
safe(LConsumer<T> other)
Safe wrapping.
|
static <T> LSupplier<LConsumer<T>> |
safeSupplier()
Safe instance supplier.
|
static <T> LSupplier<LConsumer<T>> |
safeSupplier(LSupplier<LConsumer<T>> supplier)
Safe supplier.
|
default void |
shovingAccept(T a)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
|
static <T> void |
times(int max_i,
T a,
LConsumer<T> func)
From-To.
|
static <T> void |
tryAccept(T a,
LConsumer<T> func) |
static <T> void |
tryAccept(T a,
LConsumer<T> func,
ExWF<RuntimeException> exF) |
static <T> void |
tryAccept(T a,
LConsumer<T> func,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
static <T> void |
tryAcceptThen(T a,
LConsumer<T> func,
LConsumer<Throwable> handler) |
default LConsumer<T> |
trying(ExWF<RuntimeException> exF) |
default LConsumer<T> |
trying(ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default LConsumer<T> |
tryingThen(LConsumer<Throwable> handler) |
default LTuple.Void |
tupleAccept(LSingle<T> args) |
default LConsumer |
untyped()
Cast that removes generics.
|
static <T> LConsumer<T> |
wrap(java.util.function.Consumer<T> other)
Wraps JRE instance.
|
andThenisConsumerformatTo, isAction, isFunction, isOperator, isPredicate, isSupplierisThrowingstatic final String DESCRIPTION
default void accept(T a)
accept in interface java.util.function.Consumer<T>default LTuple.Void tupleAccept(LSingle<T> args)
default void handlingAccept(T a, HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
default LConsumer<T> handling(HandlingInstructions<Throwable,RuntimeException> handling)
default void accept(T a, @Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default LConsumer<T> trying(@Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default void accept(T a, @Nonnull ExWF<RuntimeException> exF)
default LConsumer<T> trying(@Nonnull ExWF<RuntimeException> exF)
default void nestingAccept(T a)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
default void shovingAccept(T a)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
static <T> void handlingAccept(T a,
LConsumer<T> func,
HandlingInstructions<Throwable,RuntimeException> handling)
static <T> void tryAccept(T a,
LConsumer<T> func)
static <T> void tryAccept(T a,
LConsumer<T> func,
@Nonnull
ExWMF<RuntimeException> exF,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
static <T> void tryAccept(T a,
LConsumer<T> func,
@Nonnull
ExWF<RuntimeException> exF)
static <T> void tryAcceptThen(T a,
LConsumer<T> func,
@Nonnull
LConsumer<Throwable> handler)
static <T> void failSafeAccept(T a,
LConsumer<T> func,
@Nonnull
LConsumer<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 a,
LConsumer<T> func)
From-To. Intended to be used with non-capturing lambda.
static <T> void fromTill(int min_i,
int max_i,
T a,
LConsumer<T> func)
From-To. Intended to be used with non-capturing lambda.
static <T> void times(int max_i,
T a,
LConsumer<T> func)
From-To. Intended to be used with non-capturing lambda.
default LConsumer untyped()
Cast that removes generics.
default <V2> LConsumer<V2> cast()
Cast that replace generics.
@Nonnull static <T> LConsumer<T> cons(@Nonnull LConsumer<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> LConsumer<T> recursive(@Nonnull LFunction<LConsumer<T>,LConsumer<T>> selfLambda)
@Nonnull static <T> LConsumer<T> consThrowing(String message, @Nonnull ExMF<Throwable> exF)
@Nonnull static <T> LConsumer<T> wrap(java.util.function.Consumer<T> other)
Wraps JRE instance.
@Nonnull static <T> LSupplier<LConsumer<T>> safeSupplier()
Safe instance supplier. Returns supplier of safe() instance.
@Nonnull static <T> LConsumer<T> safe(@Nullable LConsumer<T> other)
Safe wrapping. Either argument function is returned (if it is not null) or safe() instance.
@Nonnull static <T> LSupplier<LConsumer<T>> safeSupplier(@Nullable LSupplier<LConsumer<T>> supplier)
Safe supplier. Either argument supplier is returned (if it is not null) or supplier of safe() instance.
@Nonnull default <V> LConsumer<V> compose(@Nonnull LFunction<? super V,? extends T> before)
Allows to manipulate the domain of the function.
static <V,T> LConsumer<V> composed(@Nonnull LFunction<? super V,? extends T> before, LConsumer<T> after)
@Nonnull default LConsumer<T> andThen(@Nonnull LConsumer<? super T> after)
Combines two LConsumer
static <T> void doNothing(T a)
Does nothing (LConsumer)
static <C0,T> int forEach(IndexedRead<C0,aType.a<T>> ia, C0 source, LConsumer<? 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 <C0,I0,T> int iterate(SequentialRead<C0,I0,aType.a<T>> sa, C0 source, LConsumer<? 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.
Copyright © 2019. All rights reserved.