@FunctionalInterface public interface LSrtUnaryOperator extends MetaOperator, MetaInterface.NonThrowing, Codomain<aType.aShort>, Domain1<aType.aShort>
Non-throwing functional interface (lambda) LSrtUnaryOperator for Java 8.
Type: operator
Domain (lvl: 1): short a
Co-domain: short
| Modifier and Type | Interface and Description |
|---|---|
static class |
LSrtUnaryOperator.LSrtUnaryOperatorSingle |
MetaInterface.NonThrowing, MetaInterface.Throwing<X>| Modifier and Type | Field and Description |
|---|---|
static String |
DESCRIPTION |
| Modifier and Type | Method and Description |
|---|---|
default short |
applyAsSrt(short a) |
default short |
applyAsSrt(short a,
ExWF<RuntimeException> exF) |
default short |
applyAsSrt(short a,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default short |
applyAsSrtThen(short a,
LToSrtFunction<Throwable> handler) |
short |
applyAsSrtX(short a)
Implement this, but call applyAsSrt(short a)
|
static short |
call(short a,
LSrtUnaryOperator lambda) |
default LSrtSupplier |
capture(short a)
Captures arguments but delays the evaluation.
|
default LSrtUnaryOperator |
compose(LSrtUnaryOperator before)
Allows to manipulate the domain of the function.
|
static LSrtUnaryOperator |
composed(LSrtUnaryOperator before,
LSrtUnaryOperator after) |
static <V> LToSrtFunction<V> |
composed(LToSrtFunction<? super V> before,
LSrtUnaryOperator after) |
static LSrtUnaryOperator |
constant(short r)
Creates function that always returns the same value.
|
static LSrtUnaryOperator |
failSafe(LSrtUnaryOperator func,
LSrtUnaryOperator failSafe) |
default short |
failSafeApplyAsSrt(short a,
LSrtUnaryOperator failSafe) |
static short |
failSafeApplyAsSrt(short a,
LSrtUnaryOperator func,
LSrtUnaryOperator failSafe) |
default <C0> void |
forEach(IndexedRead<C0,aType.aShort> ia,
C0 source,
LSrtConsumer consumer)
For each element (or tuple) from arguments, calls the function and passes the result to consumer.
|
static void |
fromTill(int min_i,
int max_i,
short a,
LSrtUnaryOperator func)
From-To.
|
static void |
fromTo(int min_i,
int max_i,
short a,
LSrtUnaryOperator func)
From-To.
|
default String |
functionalInterfaceDescription()
Returns description of the functional interface.
|
default LSrtUnaryOperator |
handling(HandlingInstructions<Throwable,RuntimeException> handling) |
default short |
handlingApplyAsSrt(short a,
HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
|
static short |
handlingApplyAsSrt(short a,
LSrtUnaryOperator func,
HandlingInstructions<Throwable,RuntimeException> handling) |
static LSrtUnaryOperator |
identity()
Returns a function that always returns its input argument.
|
default <C0,I0> void |
iterate(SequentialRead<C0,I0,aType.aShort> sa,
C0 source,
LSrtConsumer consumer)
For each element (or tuple) from arguments, calls the function and passes the result to consumer.
|
default short |
nestingApplyAsSrt(short a)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
|
default short |
nonNullApplyAsSrt(short a)
Just to mirror the method: Ensures the result is not null
|
static short |
produceShort(short a)
Does nothing (LSrtUnaryOperator) Operator
|
static LSrtUnaryOperator |
recursive(LFunction<LSrtUnaryOperator,LSrtUnaryOperator> selfLambda) |
static LSrtUnaryOperator |
safe()
Safe instance.
|
static LSrtUnaryOperator |
safe(LSrtUnaryOperator other)
Safe wrapping.
|
static LSupplier<LSrtUnaryOperator> |
safeSupplier()
Safe instance supplier.
|
static LSupplier<LSrtUnaryOperator> |
safeSupplier(LSupplier<LSrtUnaryOperator> supplier)
Safe supplier.
|
default short |
shovingApplyAsSrt(short a)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
|
static LSrtUnaryOperator |
srtUnaryOp(LSrtUnaryOperator lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
|
default <V> LToSrtFunction<V> |
srtUnaryOpCompose(LToSrtFunction<? super V> before)
Allows to manipulate the domain of the function.
|
static LSrtUnaryOperator |
srtUnaryOpThrowing(ExF<Throwable> exF) |
static LSrtUnaryOperator |
srtUnaryOpThrowing(String message,
ExMF<Throwable> exF) |
default <V> LSrtFunction<V> |
then(LSrtFunction<? extends V> after)
Combines two functions together in a order.
|
default LSrtPredicate |
thenToBool(LSrtPredicate after)
Combines two functions together in a order.
|
default LSrtToByteFunction |
thenToByte(LSrtToByteFunction after)
Combines two functions together in a order.
|
default LSrtToCharFunction |
thenToChar(LSrtToCharFunction after)
Combines two functions together in a order.
|
default LSrtToDblFunction |
thenToDbl(LSrtToDblFunction after)
Combines two functions together in a order.
|
default LSrtToFltFunction |
thenToFlt(LSrtToFltFunction after)
Combines two functions together in a order.
|
default LSrtToIntFunction |
thenToInt(LSrtToIntFunction after)
Combines two functions together in a order.
|
default LSrtToLongFunction |
thenToLong(LSrtToLongFunction after)
Combines two functions together in a order.
|
default LSrtUnaryOperator |
thenToSrt(LSrtUnaryOperator after)
Combines two functions together in a order.
|
static void |
times(int max_i,
short a,
LSrtUnaryOperator func)
From-To.
|
static short |
tryApplyAsSrt(short a,
LSrtUnaryOperator func) |
static short |
tryApplyAsSrt(short a,
LSrtUnaryOperator func,
ExWF<RuntimeException> exF) |
static short |
tryApplyAsSrt(short a,
LSrtUnaryOperator func,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
static short |
tryApplyAsSrtThen(short a,
LSrtUnaryOperator func,
LToSrtFunction<Throwable> handler) |
default LSrtUnaryOperator |
trying(ExWF<RuntimeException> exF) |
default LSrtUnaryOperator |
trying(ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default LSrtUnaryOperator |
tryingThen(LToSrtFunction<Throwable> handler) |
default short |
tupleApplyAsSrt(LSrtSingle args) |
isOperatorisFunctionformatTo, isAction, isConsumer, isPredicate, isSupplierisThrowingisThrowingstatic final String DESCRIPTION
default short applyAsSrt(short a)
short applyAsSrtX(short a)
throws Throwable
Implement this, but call applyAsSrt(short a)
Throwabledefault short tupleApplyAsSrt(LSrtSingle args)
default short handlingApplyAsSrt(short a,
HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
default LSrtUnaryOperator handling(HandlingInstructions<Throwable,RuntimeException> handling)
default short applyAsSrt(short a,
@Nonnull
ExWMF<RuntimeException> exF,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
default LSrtUnaryOperator trying(@Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default short applyAsSrt(short a,
@Nonnull
ExWF<RuntimeException> exF)
default LSrtUnaryOperator trying(@Nonnull ExWF<RuntimeException> exF)
default short applyAsSrtThen(short a,
@Nonnull
LToSrtFunction<Throwable> handler)
default LSrtUnaryOperator tryingThen(@Nonnull LToSrtFunction<Throwable> handler)
default short nestingApplyAsSrt(short a)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
default short shovingApplyAsSrt(short a)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
static short handlingApplyAsSrt(short a,
LSrtUnaryOperator func,
HandlingInstructions<Throwable,RuntimeException> handling)
static short tryApplyAsSrt(short a,
LSrtUnaryOperator func)
static short tryApplyAsSrt(short a,
LSrtUnaryOperator func,
@Nonnull
ExWMF<RuntimeException> exF,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
static short tryApplyAsSrt(short a,
LSrtUnaryOperator func,
@Nonnull
ExWF<RuntimeException> exF)
static short tryApplyAsSrtThen(short a,
LSrtUnaryOperator func,
@Nonnull
LToSrtFunction<Throwable> handler)
default short failSafeApplyAsSrt(short a,
@Nonnull
LSrtUnaryOperator failSafe)
static short failSafeApplyAsSrt(short a,
LSrtUnaryOperator func,
@Nonnull
LSrtUnaryOperator failSafe)
static LSrtUnaryOperator failSafe(LSrtUnaryOperator func, @Nonnull LSrtUnaryOperator failSafe)
default short nonNullApplyAsSrt(short a)
Just to mirror the method: Ensures the result is not null
@Nonnull default String functionalInterfaceDescription()
Returns description of the functional interface.
functionalInterfaceDescription in interface MetaFunctionalInterfacestatic void fromTo(int min_i,
int max_i,
short a,
LSrtUnaryOperator func)
From-To. Intended to be used with non-capturing lambda.
static void fromTill(int min_i,
int max_i,
short a,
LSrtUnaryOperator func)
From-To. Intended to be used with non-capturing lambda.
static void times(int max_i,
short a,
LSrtUnaryOperator func)
From-To. Intended to be used with non-capturing lambda.
default LSrtSupplier capture(short a)
Captures arguments but delays the evaluation.
static LSrtUnaryOperator constant(short r)
Creates function that always returns the same value.
@Nonnull static LSrtUnaryOperator srtUnaryOp(@Nonnull LSrtUnaryOperator lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
@Nonnull static LSrtUnaryOperator recursive(@Nonnull LFunction<LSrtUnaryOperator,LSrtUnaryOperator> selfLambda)
@Nonnull static LSrtUnaryOperator srtUnaryOpThrowing(@Nonnull ExF<Throwable> exF)
@Nonnull static LSrtUnaryOperator srtUnaryOpThrowing(String message, @Nonnull ExMF<Throwable> exF)
static short call(short a,
@Nonnull
LSrtUnaryOperator lambda)
@Nonnull static LSrtUnaryOperator safe()
Safe instance. That always returns the same value (as produceShort).
@Nonnull static LSupplier<LSrtUnaryOperator> safeSupplier()
Safe instance supplier. Returns supplier of safe() instance.
@Nonnull static LSrtUnaryOperator safe(@Nullable LSrtUnaryOperator other)
Safe wrapping. Either argument function is returned (if it is not null) or safe() instance.
@Nonnull static LSupplier<LSrtUnaryOperator> safeSupplier(@Nullable LSupplier<LSrtUnaryOperator> supplier)
Safe supplier. Either argument supplier is returned (if it is not null) or supplier of safe() instance.
@Nonnull default LSrtUnaryOperator compose(@Nonnull LSrtUnaryOperator before)
Allows to manipulate the domain of the function.
static LSrtUnaryOperator composed(@Nonnull LSrtUnaryOperator before, LSrtUnaryOperator after)
@Nonnull default <V> LToSrtFunction<V> srtUnaryOpCompose(@Nonnull LToSrtFunction<? super V> before)
Allows to manipulate the domain of the function.
static <V> LToSrtFunction<V> composed(@Nonnull LToSrtFunction<? super V> before, LSrtUnaryOperator after)
@Nonnull default <V> LSrtFunction<V> then(@Nonnull LSrtFunction<? extends V> after)
Combines two functions together in a order.
@Nonnull default LSrtToByteFunction thenToByte(@Nonnull LSrtToByteFunction after)
Combines two functions together in a order.
@Nonnull default LSrtUnaryOperator thenToSrt(@Nonnull LSrtUnaryOperator after)
Combines two functions together in a order.
@Nonnull default LSrtToIntFunction thenToInt(@Nonnull LSrtToIntFunction after)
Combines two functions together in a order.
@Nonnull default LSrtToLongFunction thenToLong(@Nonnull LSrtToLongFunction after)
Combines two functions together in a order.
@Nonnull default LSrtToFltFunction thenToFlt(@Nonnull LSrtToFltFunction after)
Combines two functions together in a order.
@Nonnull default LSrtToDblFunction thenToDbl(@Nonnull LSrtToDblFunction after)
Combines two functions together in a order.
@Nonnull default LSrtToCharFunction thenToChar(@Nonnull LSrtToCharFunction after)
Combines two functions together in a order.
@Nonnull default LSrtPredicate thenToBool(@Nonnull LSrtPredicate after)
Combines two functions together in a order.
@Nonnull static LSrtUnaryOperator identity()
Returns a function that always returns its input argument.
static short produceShort(short a)
Does nothing (LSrtUnaryOperator) Operator
default <C0> void forEach(IndexedRead<C0,aType.aShort> ia, C0 source, LSrtConsumer consumer)
For each element (or tuple) from arguments, calls the function and passes the result to consumer. Thread safety, fail-fast, fail-safety of this method is not expected.
default <C0,I0> void iterate(SequentialRead<C0,I0,aType.aShort> sa, C0 source, LSrtConsumer consumer)
For each element (or tuple) from arguments, calls the function and passes the result to consumer. Thread safety, fail-fast, fail-safety of this method depends highly on the arguments.
Copyright © 2019. All rights reserved.