@FunctionalInterface public interface LAction extends Runnable, MetaAction, MetaInterface.NonThrowing, Codomain<aType.aVoid>, Domain0
LAction is a replacement for Runnable.
Non-throwing functional interface (lambda) LAction for Java 8.
Type: action
Domain (lvl: 0): none
Co-domain: none
| Modifier and Type | Interface and Description |
|---|---|
static class |
LAction.LActionSingle |
MetaInterface.NonThrowing, MetaInterface.Throwing<X>| Modifier and Type | Field and Description |
|---|---|
static String |
DESCRIPTION |
| Modifier and Type | Method and Description |
|---|---|
static LAction |
act(LAction lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
|
static LAction |
actThrowing(ExF<Throwable> exF) |
static LAction |
actThrowing(String message,
ExMF<Throwable> exF) |
default LAction |
andThen(LAction after)
Combines two LAction together in a order.
|
static void |
call(LAction lambda) |
static void |
doNothing()
You can use this as a reference method whenever nothing should be done.
|
default void |
execute() |
default void |
execute(ExWF<RuntimeException> exF) |
default void |
execute(ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default void |
executeThen(LConsumer<Throwable> handler) |
void |
executeX()
Implement this, but call execute()
|
static LAction |
failSafe(LAction func,
LAction failSafe) |
default void |
failSafeExecute(LAction failSafe) |
static void |
failSafeExecute(LAction func,
LAction failSafe) |
static void |
fromTill(int min_i,
int max_i,
LAction func)
From-To.
|
static void |
fromTo(int min_i,
int max_i,
LAction func)
From-To.
|
default String |
functionalInterfaceDescription()
Returns description of the functional interface.
|
default LAction |
handling(HandlingInstructions<Throwable,RuntimeException> handling) |
default void |
handlingExecute(HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
|
static void |
handlingExecute(LAction func,
HandlingInstructions<Throwable,RuntimeException> handling) |
default void |
nestingExecute()
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
|
static LAction |
recursive(LFunction<LAction,LAction> selfLambda) |
default void |
run()
Deprecated.
Calling this method via LAction interface should be discouraged.
|
static LAction |
safe()
Safe instance.
|
static LAction |
safe(LAction other)
Safe wrapping.
|
static LSupplier<LAction> |
safeSupplier()
Safe instance supplier.
|
static LSupplier<LAction> |
safeSupplier(LSupplier<LAction> supplier)
Safe supplier.
|
default void |
shovingExecute()
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
|
static void |
times(int max_i,
LAction func)
From-To.
|
static void |
tryExecute(LAction func) |
static void |
tryExecute(LAction func,
ExWF<RuntimeException> exF) |
static void |
tryExecute(LAction func,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
static void |
tryExecuteThen(LAction func,
LConsumer<Throwable> handler) |
default LAction |
trying(ExWF<RuntimeException> exF) |
default LAction |
trying(ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default LAction |
tryingThen(LConsumer<Throwable> handler) |
default LTuple.Void |
tupleExecute(LTuple.Void args) |
static LAction |
wrap(Runnable other)
Wraps JRE instance.
|
isActionformatTo, isConsumer, isFunction, isOperator, isPredicate, isSupplierisThrowingstatic final String DESCRIPTION
@Deprecated default void run()
Default implementation for JRE method that calls exception nesting method.
default void execute()
default LTuple.Void tupleExecute(LTuple.Void args)
default void handlingExecute(HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
default LAction handling(HandlingInstructions<Throwable,RuntimeException> handling)
default void execute(@Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default LAction trying(@Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default void execute(@Nonnull ExWF<RuntimeException> exF)
default LAction trying(@Nonnull ExWF<RuntimeException> exF)
default void nestingExecute()
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
default void shovingExecute()
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
static void handlingExecute(LAction func, HandlingInstructions<Throwable,RuntimeException> handling)
static void tryExecute(LAction func)
static void tryExecute(LAction func, @Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
static void tryExecute(LAction func, @Nonnull ExWF<RuntimeException> exF)
@Nonnull default String functionalInterfaceDescription()
Returns description of the functional interface.
functionalInterfaceDescription in interface MetaFunctionalInterfacestatic void fromTo(int min_i,
int max_i,
LAction func)
From-To. Intended to be used with non-capturing lambda.
static void fromTill(int min_i,
int max_i,
LAction func)
From-To. Intended to be used with non-capturing lambda.
static void times(int max_i,
LAction func)
From-To. Intended to be used with non-capturing lambda.
@Nonnull static LAction act(@Nonnull LAction lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
@Nonnull static LSupplier<LAction> safeSupplier()
Safe instance supplier. Returns supplier of safe() instance.
@Nonnull static LAction safe(@Nullable LAction other)
Safe wrapping. Either argument function is returned (if it is not null) or safe() instance.
@Nonnull static LSupplier<LAction> safeSupplier(@Nullable LSupplier<LAction> supplier)
Safe supplier. Either argument supplier is returned (if it is not null) or supplier of safe() instance.
@Nonnull default LAction andThen(@Nonnull LAction after)
Combines two LAction together in a order.
static void doNothing()
You can use this as a reference method whenever nothing should be done.
Copyright © 2019. All rights reserved.