@FunctionalInterface public interface LOiToSrtFunction<T> extends MetaFunction, MetaInterface.NonThrowing, OiFunction<T,aType.aShort>, Codomain<aType.aShort>, Domain2<aType.a<T>,aType.aInt>
Non-throwing functional interface (lambda) LOiToSrtFunction for Java 8.
Type: function
Domain (lvl: 2): T a1,int a2
Co-domain: short
Special case of function that corresponds to expressions like (list, index) -> List::get
| Modifier and Type | Interface and Description |
|---|---|
static interface |
LOiToSrtFunction.LIntObjToSrtFunc<T>
Permutation of LOiToSrtFunction for method references.
|
static class |
LOiToSrtFunction.LOiToSrtFunctionSingle<T> |
MetaInterface.NonThrowing, MetaInterface.Throwing<X>| Modifier and Type | Field and Description |
|---|---|
static String |
DESCRIPTION |
| Modifier and Type | Method and Description |
|---|---|
static <T> LOiToSrtFunction<T> |
apply1stAsSrt(LToSrtFunction<T> func)
Captures single parameter function into this interface where only 1st parameter will be used.
|
static <T> LOiToSrtFunction<T> |
apply2ndAsSrt(LIntToSrtFunction func)
Captures single parameter function into this interface where only 2nd parameter will be used.
|
default short |
applyAsSrt(T a1,
int a2) |
default short |
applyAsSrt(T a1,
int a2,
ExWF<RuntimeException> exF) |
default short |
applyAsSrt(T a1,
int a2,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default short |
applyAsSrtThen(T a1,
int a2,
LToSrtFunction<Throwable> handler) |
short |
applyAsSrtX(T a1,
int a2)
Implement this, but call applyAsSrt(T a1,int a2)
|
static <T> short |
call(T a1,
int a2,
LOiToSrtFunction<T> lambda) |
default LSrtSupplier |
capture(T a1,
int a2)
Captures arguments but delays the evaluation.
|
default <V2> LOiToSrtFunction<V2> |
cast()
Cast that replace generics.
|
static <V2,T> LOiToSrtFunction<V2> |
cast(LOiToSrtFunction<T> function)
Cast that replace generics.
|
default <V1> LOiToSrtFunction<V1> |
compose(LFunction<? super V1,? extends T> before1,
LIntUnaryOperator before2)
Allows to manipulate the domain of the function.
|
static <V1,T> LOiToSrtFunction<V1> |
composed(LFunction<? super V1,? extends T> before1,
LIntUnaryOperator before2,
LOiToSrtFunction<T> after) |
static <V1,V2,T> LToSrtBiFunction<V1,V2> |
composed(LFunction<? super V1,? extends T> before1,
LToIntFunction<? super V2> before2,
LOiToSrtFunction<T> after) |
static <T> LOiToSrtFunction<T> |
constant(short r)
Creates function that always returns the same value.
|
static <T> LOiToSrtFunction<T> |
failSafe(LOiToSrtFunction<T> func,
LOiToSrtFunction<T> failSafe) |
default short |
failSafeApplyAsSrt(T a1,
int a2,
LOiToSrtFunction<T> failSafe) |
static <T> short |
failSafeApplyAsSrt(T a1,
int a2,
LOiToSrtFunction<T> func,
LOiToSrtFunction<T> failSafe) |
default <C1,C2> void |
forEach(IndexedRead<C1,aType.a<T>> ia1,
C1 source1,
IndexedRead<C2,aType.aInt> ia2,
C2 source2,
LSrtConsumer consumer)
For each element (or tuple) from arguments, calls the function and passes the result to consumer.
|
static <T> void |
fromTill(int min_a2,
int max_a2,
T a1,
LOiToSrtFunction<T> func)
From-To.
|
static <T> void |
fromTo(int min_a2,
int max_a2,
T a1,
LOiToSrtFunction<T> func)
From-To.
|
default String |
functionalInterfaceDescription()
Returns description of the functional interface.
|
default LOiToSrtFunction<T> |
handling(HandlingInstructions<Throwable,RuntimeException> handling) |
default short |
handlingApplyAsSrt(T a1,
int a2,
HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
|
static <T> short |
handlingApplyAsSrt(T a1,
int a2,
LOiToSrtFunction<T> func,
HandlingInstructions<Throwable,RuntimeException> handling) |
static <T> LOiToSrtFunction.LIntObjToSrtFunc<T> |
intObjToSrtFunc(LOiToSrtFunction.LIntObjToSrtFunc<T> lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
|
default <C1,C2,I2> void |
iterate(IndexedRead<C1,aType.a<T>> ia1,
C1 source1,
SequentialRead<C2,I2,aType.aInt> sa2,
C2 source2,
LSrtConsumer consumer)
For each element (or tuple) from arguments, calls the function and passes the result to consumer.
|
default <C1,I1,C2> void |
iterate(SequentialRead<C1,I1,aType.a<T>> sa1,
C1 source1,
IndexedRead<C2,aType.aInt> ia2,
C2 source2,
LSrtConsumer consumer)
For each element (or tuple) from arguments, calls the function and passes the result to consumer.
|
default <C1,I1,C2,I2> |
iterate(SequentialRead<C1,I1,aType.a<T>> sa1,
C1 source1,
SequentialRead<C2,I2,aType.aInt> sa2,
C2 source2,
LSrtConsumer consumer)
For each element (or tuple) from arguments, calls the function and passes the result to consumer.
|
default LIntToSrtFunction |
lShrink(LIntFunction<T> left) |
default LIntToSrtFunction |
lShrinkc(T a1) |
static <T> LIntToSrtFunction |
lShrinked(LIntFunction<T> left,
LOiToSrtFunction<T> func) |
static <T> LIntToSrtFunction |
lShrinkedc(T a1,
LOiToSrtFunction<T> func) |
default short |
nestingApplyAsSrt(T a1,
int a2)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
|
default short |
nonNullApplyAsSrt(T a1,
int a2)
Just to mirror the method: Ensures the result is not null
|
static <T> LOiToSrtFunction<T> |
oiToSrtFunc(LOiToSrtFunction<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> LToSrtBiFunction<V1,V2> |
oiToSrtFuncCompose(LFunction<? super V1,? extends T> before1,
LToIntFunction<? super V2> before2)
Allows to manipulate the domain of the function.
|
static <T> LOiToSrtFunction<T> |
oiToSrtFuncThrowing(ExF<Throwable> exF) |
static <T> LOiToSrtFunction<T> |
oiToSrtFuncThrowing(String message,
ExMF<Throwable> exF) |
static <T> short |
produceShort(int a2,
T a1)
Does nothing (LOiToSrtFunction.LIntObjToSrtFunc) Function
|
static <T> short |
produceShort(T a1,
int a2)
Does nothing (LOiToSrtFunction) Function
|
static <T> LOiToSrtFunction<T> |
recursive(LFunction<LOiToSrtFunction<T>,LOiToSrtFunction<T>> selfLambda) |
default LToSrtFunction<T> |
rShrink(LToIntFunction<T> right) |
default LToSrtFunction<T> |
rShrinkc(int a2) |
static <T> LToSrtFunction<T> |
rShrinked(LToIntFunction<T> right,
LOiToSrtFunction<T> func) |
static <T> LToSrtFunction<T> |
rShrinkedc(int a2,
LOiToSrtFunction<T> func) |
static <T> LOiToSrtFunction<T> |
safe()
Safe instance.
|
static <T> LOiToSrtFunction<T> |
safe(LOiToSrtFunction<T> other)
Safe wrapping.
|
static <T> LSupplier<LOiToSrtFunction<T>> |
safeSupplier()
Safe instance supplier.
|
static <T> LSupplier<LOiToSrtFunction<T>> |
safeSupplier(LSupplier<LOiToSrtFunction<T>> supplier)
Safe supplier.
|
default short |
shovingApplyAsSrt(T a1,
int a2)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
|
default <V> LOiFunction<T,V> |
then(LSrtFunction<? extends V> after)
Combines two functions together in a order.
|
default LObjIntPredicate<T> |
thenToBool(LSrtPredicate after)
Combines two functions together in a order.
|
default LOiToByteFunction<T> |
thenToByte(LSrtToByteFunction after)
Combines two functions together in a order.
|
default LOiToCharFunction<T> |
thenToChar(LSrtToCharFunction after)
Combines two functions together in a order.
|
default LOiToDblFunction<T> |
thenToDbl(LSrtToDblFunction after)
Combines two functions together in a order.
|
default LOiToFltFunction<T> |
thenToFlt(LSrtToFltFunction after)
Combines two functions together in a order.
|
default LOiToIntFunction<T> |
thenToInt(LSrtToIntFunction after)
Combines two functions together in a order.
|
default LOiToLongFunction<T> |
thenToLong(LSrtToLongFunction after)
Combines two functions together in a order.
|
default LOiToSrtFunction<T> |
thenToSrt(LSrtUnaryOperator after)
Combines two functions together in a order.
|
static <T> void |
times(int max_a2,
T a1,
LOiToSrtFunction<T> func)
From-To.
|
static <T> short |
tryApplyAsSrt(T a1,
int a2,
LOiToSrtFunction<T> func) |
static <T> short |
tryApplyAsSrt(T a1,
int a2,
LOiToSrtFunction<T> func,
ExWF<RuntimeException> exF) |
static <T> short |
tryApplyAsSrt(T a1,
int a2,
LOiToSrtFunction<T> func,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
static <T> short |
tryApplyAsSrtThen(T a1,
int a2,
LOiToSrtFunction<T> func,
LToSrtFunction<Throwable> handler) |
default LOiToSrtFunction<T> |
trying(ExWF<RuntimeException> exF) |
default LOiToSrtFunction<T> |
trying(ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default LOiToSrtFunction<T> |
tryingThen(LToSrtFunction<Throwable> handler) |
default short |
tupleApplyAsSrt(LObjIntPair<T> args) |
static <T> LOiToSrtFunction<T> |
uncurry(LFunction<T,LIntToSrtFunction> func) |
default LOiToSrtFunction |
untyped()
Cast that removes generics.
|
isThrowingisFunctionformatTo, isAction, isConsumer, isOperator, isPredicate, isSupplierstatic final String DESCRIPTION
default short applyAsSrt(T a1, int a2)
short applyAsSrtX(T a1, int a2) throws Throwable
Implement this, but call applyAsSrt(T a1,int a2)
Throwabledefault short tupleApplyAsSrt(LObjIntPair<T> args)
default short handlingApplyAsSrt(T a1, int a2, HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
default LOiToSrtFunction<T> handling(HandlingInstructions<Throwable,RuntimeException> handling)
default short applyAsSrt(T a1, int a2, @Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default LOiToSrtFunction<T> trying(@Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default short applyAsSrt(T a1, int a2, @Nonnull ExWF<RuntimeException> exF)
default LOiToSrtFunction<T> trying(@Nonnull ExWF<RuntimeException> exF)
default short applyAsSrtThen(T a1, int a2, @Nonnull LToSrtFunction<Throwable> handler)
default LOiToSrtFunction<T> tryingThen(@Nonnull LToSrtFunction<Throwable> handler)
default short nestingApplyAsSrt(T a1, int a2)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
default short shovingApplyAsSrt(T a1, int a2)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
static <T> short handlingApplyAsSrt(T a1,
int a2,
LOiToSrtFunction<T> func,
HandlingInstructions<Throwable,RuntimeException> handling)
static <T> short tryApplyAsSrt(T a1,
int a2,
LOiToSrtFunction<T> func)
static <T> short tryApplyAsSrt(T a1,
int a2,
LOiToSrtFunction<T> func,
@Nonnull
ExWMF<RuntimeException> exF,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
static <T> short tryApplyAsSrt(T a1,
int a2,
LOiToSrtFunction<T> func,
@Nonnull
ExWF<RuntimeException> exF)
static <T> short tryApplyAsSrtThen(T a1,
int a2,
LOiToSrtFunction<T> func,
@Nonnull
LToSrtFunction<Throwable> handler)
default short failSafeApplyAsSrt(T a1, int a2, @Nonnull LOiToSrtFunction<T> failSafe)
static <T> short failSafeApplyAsSrt(T a1,
int a2,
LOiToSrtFunction<T> func,
@Nonnull
LOiToSrtFunction<T> failSafe)
static <T> LOiToSrtFunction<T> failSafe(LOiToSrtFunction<T> func, @Nonnull LOiToSrtFunction<T> failSafe)
default short nonNullApplyAsSrt(T a1, int a2)
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 <T> void fromTo(int min_a2,
int max_a2,
T a1,
LOiToSrtFunction<T> func)
From-To. Intended to be used with non-capturing lambda.
static <T> void fromTill(int min_a2,
int max_a2,
T a1,
LOiToSrtFunction<T> func)
From-To. Intended to be used with non-capturing lambda.
static <T> void times(int max_a2,
T a1,
LOiToSrtFunction<T> func)
From-To. Intended to be used with non-capturing lambda.
default LIntToSrtFunction lShrink(LIntFunction<T> left)
default LIntToSrtFunction lShrinkc(T a1)
static <T> LIntToSrtFunction lShrinked(LIntFunction<T> left, LOiToSrtFunction<T> func)
static <T> LIntToSrtFunction lShrinkedc(T a1, LOiToSrtFunction<T> func)
default LToSrtFunction<T> rShrink(LToIntFunction<T> right)
default LToSrtFunction<T> rShrinkc(int a2)
static <T> LToSrtFunction<T> rShrinked(LToIntFunction<T> right, LOiToSrtFunction<T> func)
static <T> LToSrtFunction<T> rShrinkedc(int a2, LOiToSrtFunction<T> func)
static <T> LOiToSrtFunction<T> uncurry(LFunction<T,LIntToSrtFunction> func)
default LOiToSrtFunction untyped()
Cast that removes generics.
default <V2> LOiToSrtFunction<V2> cast()
Cast that replace generics.
static <V2,T> LOiToSrtFunction<V2> cast(LOiToSrtFunction<T> function)
Cast that replace generics.
default LSrtSupplier capture(T a1, int a2)
Captures arguments but delays the evaluation.
static <T> LOiToSrtFunction<T> constant(short r)
Creates function that always returns the same value.
@Nonnull static <T> LOiToSrtFunction<T> apply1stAsSrt(@Nonnull LToSrtFunction<T> func)
Captures single parameter function into this interface where only 1st parameter will be used.
@Nonnull static <T> LOiToSrtFunction<T> apply2ndAsSrt(@Nonnull LIntToSrtFunction func)
Captures single parameter function into this interface where only 2nd parameter will be used.
@Nonnull static <T> LOiToSrtFunction<T> oiToSrtFunc(@Nonnull LOiToSrtFunction<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> LOiToSrtFunction<T> recursive(@Nonnull LFunction<LOiToSrtFunction<T>,LOiToSrtFunction<T>> selfLambda)
@Nonnull static <T> LOiToSrtFunction<T> oiToSrtFuncThrowing(@Nonnull ExF<Throwable> exF)
@Nonnull static <T> LOiToSrtFunction<T> oiToSrtFuncThrowing(String message, @Nonnull ExMF<Throwable> exF)
@Nonnull static <T> LOiToSrtFunction.LIntObjToSrtFunc<T> intObjToSrtFunc(@Nonnull LOiToSrtFunction.LIntObjToSrtFunc<T> lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
static <T> short call(T a1,
int a2,
@Nonnull
LOiToSrtFunction<T> lambda)
@Nonnull static <T> LOiToSrtFunction<T> safe()
Safe instance. That always returns the same value (as produceShort).
@Nonnull static <T> LSupplier<LOiToSrtFunction<T>> safeSupplier()
Safe instance supplier. Returns supplier of safe() instance.
@Nonnull static <T> LOiToSrtFunction<T> safe(@Nullable LOiToSrtFunction<T> other)
Safe wrapping. Either argument function is returned (if it is not null) or safe() instance.
@Nonnull static <T> LSupplier<LOiToSrtFunction<T>> safeSupplier(@Nullable LSupplier<LOiToSrtFunction<T>> supplier)
Safe supplier. Either argument supplier is returned (if it is not null) or supplier of safe() instance.
@Nonnull default <V1> LOiToSrtFunction<V1> compose(@Nonnull LFunction<? super V1,? extends T> before1, @Nonnull LIntUnaryOperator before2)
Allows to manipulate the domain of the function.
static <V1,T> LOiToSrtFunction<V1> composed(@Nonnull LFunction<? super V1,? extends T> before1, @Nonnull LIntUnaryOperator before2, LOiToSrtFunction<T> after)
@Nonnull default <V1,V2> LToSrtBiFunction<V1,V2> oiToSrtFuncCompose(@Nonnull LFunction<? super V1,? extends T> before1, @Nonnull LToIntFunction<? super V2> before2)
Allows to manipulate the domain of the function.
static <V1,V2,T> LToSrtBiFunction<V1,V2> composed(@Nonnull LFunction<? super V1,? extends T> before1, @Nonnull LToIntFunction<? super V2> before2, LOiToSrtFunction<T> after)
@Nonnull default <V> LOiFunction<T,V> then(@Nonnull LSrtFunction<? extends V> after)
Combines two functions together in a order.
@Nonnull default LOiToByteFunction<T> thenToByte(@Nonnull LSrtToByteFunction after)
Combines two functions together in a order.
@Nonnull default LOiToSrtFunction<T> thenToSrt(@Nonnull LSrtUnaryOperator after)
Combines two functions together in a order.
@Nonnull default LOiToIntFunction<T> thenToInt(@Nonnull LSrtToIntFunction after)
Combines two functions together in a order.
@Nonnull default LOiToLongFunction<T> thenToLong(@Nonnull LSrtToLongFunction after)
Combines two functions together in a order.
@Nonnull default LOiToFltFunction<T> thenToFlt(@Nonnull LSrtToFltFunction after)
Combines two functions together in a order.
@Nonnull default LOiToDblFunction<T> thenToDbl(@Nonnull LSrtToDblFunction after)
Combines two functions together in a order.
@Nonnull default LOiToCharFunction<T> thenToChar(@Nonnull LSrtToCharFunction after)
Combines two functions together in a order.
@Nonnull default LObjIntPredicate<T> thenToBool(@Nonnull LSrtPredicate after)
Combines two functions together in a order.
static <T> short produceShort(T a1,
int a2)
Does nothing (LOiToSrtFunction) Function
static <T> short produceShort(int a2,
T a1)
Does nothing (LOiToSrtFunction.LIntObjToSrtFunc) Function
default <C1,C2> void forEach(IndexedRead<C1,aType.a<T>> ia1, C1 source1, IndexedRead<C2,aType.aInt> ia2, C2 source2, 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 <C1,I1,C2> void iterate(SequentialRead<C1,I1,aType.a<T>> sa1, C1 source1, IndexedRead<C2,aType.aInt> ia2, C2 source2, 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 <C1,C2,I2> void iterate(IndexedRead<C1,aType.a<T>> ia1, C1 source1, SequentialRead<C2,I2,aType.aInt> sa2, C2 source2, 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 <C1,I1,C2,I2> void iterate(SequentialRead<C1,I1,aType.a<T>> sa1, C1 source1, SequentialRead<C2,I2,aType.aInt> sa2, C2 source2, 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.