@FunctionalInterface public interface LOiToFltFunction<T> extends MetaFunction, MetaInterface.NonThrowing, OiFunction<T,aType.aFloat>, Codomain<aType.aFloat>, Domain2<aType.a<T>,aType.aInt>
Non-throwing functional interface (lambda) LOiToFltFunction for Java 8.
Type: function
Domain (lvl: 2): T a1,int a2
Co-domain: float
Special case of function that corresponds to expressions like (list, index) -> List::get
| Modifier and Type | Interface and Description |
|---|---|
static interface |
LOiToFltFunction.LIntObjToFltFunc<T>
Permutation of LOiToFltFunction for method references.
|
static class |
LOiToFltFunction.LOiToFltFunctionSingle<T> |
MetaInterface.NonThrowing, MetaInterface.Throwing<X>| Modifier and Type | Field and Description |
|---|---|
static String |
DESCRIPTION |
| Modifier and Type | Method and Description |
|---|---|
static <T> LOiToFltFunction<T> |
apply1stAsFlt(LToFltFunction<T> func)
Captures single parameter function into this interface where only 1st parameter will be used.
|
static <T> LOiToFltFunction<T> |
apply2ndAsFlt(LIntToFltFunction func)
Captures single parameter function into this interface where only 2nd parameter will be used.
|
default float |
applyAsFlt(T a1,
int a2) |
default float |
applyAsFlt(T a1,
int a2,
ExWF<RuntimeException> exF) |
default float |
applyAsFlt(T a1,
int a2,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default float |
applyAsFltThen(T a1,
int a2,
LToFltFunction<Throwable> handler) |
float |
applyAsFltX(T a1,
int a2)
Implement this, but call applyAsFlt(T a1,int a2)
|
static <T> float |
call(T a1,
int a2,
LOiToFltFunction<T> lambda) |
default LFltSupplier |
capture(T a1,
int a2)
Captures arguments but delays the evaluation.
|
default <V2> LOiToFltFunction<V2> |
cast()
Cast that replace generics.
|
static <V2,T> LOiToFltFunction<V2> |
cast(LOiToFltFunction<T> function)
Cast that replace generics.
|
default <V1> LOiToFltFunction<V1> |
compose(LFunction<? super V1,? extends T> before1,
LIntUnaryOperator before2)
Allows to manipulate the domain of the function.
|
static <V1,T> LOiToFltFunction<V1> |
composed(LFunction<? super V1,? extends T> before1,
LIntUnaryOperator before2,
LOiToFltFunction<T> after) |
static <V1,V2,T> LToFltBiFunction<V1,V2> |
composed(LFunction<? super V1,? extends T> before1,
LToIntFunction<? super V2> before2,
LOiToFltFunction<T> after) |
static <T> LOiToFltFunction<T> |
constant(float r)
Creates function that always returns the same value.
|
static <T> LOiToFltFunction<T> |
failSafe(LOiToFltFunction<T> func,
LOiToFltFunction<T> failSafe) |
default float |
failSafeApplyAsFlt(T a1,
int a2,
LOiToFltFunction<T> failSafe) |
static <T> float |
failSafeApplyAsFlt(T a1,
int a2,
LOiToFltFunction<T> func,
LOiToFltFunction<T> failSafe) |
default <C1,C2> void |
forEach(IndexedRead<C1,aType.a<T>> ia1,
C1 source1,
IndexedRead<C2,aType.aInt> ia2,
C2 source2,
LFltConsumer 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,
LOiToFltFunction<T> func)
From-To.
|
static <T> void |
fromTo(int min_a2,
int max_a2,
T a1,
LOiToFltFunction<T> func)
From-To.
|
default String |
functionalInterfaceDescription()
Returns description of the functional interface.
|
default LOiToFltFunction<T> |
handling(HandlingInstructions<Throwable,RuntimeException> handling) |
default float |
handlingApplyAsFlt(T a1,
int a2,
HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
|
static <T> float |
handlingApplyAsFlt(T a1,
int a2,
LOiToFltFunction<T> func,
HandlingInstructions<Throwable,RuntimeException> handling) |
static <T> LOiToFltFunction.LIntObjToFltFunc<T> |
intObjToFltFunc(LOiToFltFunction.LIntObjToFltFunc<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,
LFltConsumer 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,
LFltConsumer 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,
LFltConsumer consumer)
For each element (or tuple) from arguments, calls the function and passes the result to consumer.
|
default LIntToFltFunction |
lShrink(LIntFunction<T> left) |
default LIntToFltFunction |
lShrinkc(T a1) |
static <T> LIntToFltFunction |
lShrinked(LIntFunction<T> left,
LOiToFltFunction<T> func) |
static <T> LIntToFltFunction |
lShrinkedc(T a1,
LOiToFltFunction<T> func) |
default float |
nestingApplyAsFlt(T a1,
int a2)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
|
default float |
nonNullApplyAsFlt(T a1,
int a2)
Just to mirror the method: Ensures the result is not null
|
static <T> LOiToFltFunction<T> |
oiToFltFunc(LOiToFltFunction<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> LToFltBiFunction<V1,V2> |
oiToFltFuncCompose(LFunction<? super V1,? extends T> before1,
LToIntFunction<? super V2> before2)
Allows to manipulate the domain of the function.
|
static <T> LOiToFltFunction<T> |
oiToFltFuncThrowing(ExF<Throwable> exF) |
static <T> LOiToFltFunction<T> |
oiToFltFuncThrowing(String message,
ExMF<Throwable> exF) |
static <T> float |
produceFloat(int a2,
T a1)
Does nothing (LOiToFltFunction.LIntObjToFltFunc) Function
|
static <T> float |
produceFloat(T a1,
int a2)
Does nothing (LOiToFltFunction) Function
|
static <T> LOiToFltFunction<T> |
recursive(LFunction<LOiToFltFunction<T>,LOiToFltFunction<T>> selfLambda) |
default LToFltFunction<T> |
rShrink(LToIntFunction<T> right) |
default LToFltFunction<T> |
rShrinkc(int a2) |
static <T> LToFltFunction<T> |
rShrinked(LToIntFunction<T> right,
LOiToFltFunction<T> func) |
static <T> LToFltFunction<T> |
rShrinkedc(int a2,
LOiToFltFunction<T> func) |
static <T> LOiToFltFunction<T> |
safe()
Safe instance.
|
static <T> LOiToFltFunction<T> |
safe(LOiToFltFunction<T> other)
Safe wrapping.
|
static <T> LSupplier<LOiToFltFunction<T>> |
safeSupplier()
Safe instance supplier.
|
static <T> LSupplier<LOiToFltFunction<T>> |
safeSupplier(LSupplier<LOiToFltFunction<T>> supplier)
Safe supplier.
|
default float |
shovingApplyAsFlt(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(LFltFunction<? extends V> after)
Combines two functions together in a order.
|
default LObjIntPredicate<T> |
thenToBool(LFltPredicate after)
Combines two functions together in a order.
|
default LOiToByteFunction<T> |
thenToByte(LFltToByteFunction after)
Combines two functions together in a order.
|
default LOiToCharFunction<T> |
thenToChar(LFltToCharFunction after)
Combines two functions together in a order.
|
default LOiToDblFunction<T> |
thenToDbl(LFltToDblFunction after)
Combines two functions together in a order.
|
default LOiToFltFunction<T> |
thenToFlt(LFltUnaryOperator after)
Combines two functions together in a order.
|
default LOiToIntFunction<T> |
thenToInt(LFltToIntFunction after)
Combines two functions together in a order.
|
default LOiToLongFunction<T> |
thenToLong(LFltToLongFunction after)
Combines two functions together in a order.
|
default LOiToSrtFunction<T> |
thenToSrt(LFltToSrtFunction after)
Combines two functions together in a order.
|
static <T> void |
times(int max_a2,
T a1,
LOiToFltFunction<T> func)
From-To.
|
static <T> float |
tryApplyAsFlt(T a1,
int a2,
LOiToFltFunction<T> func) |
static <T> float |
tryApplyAsFlt(T a1,
int a2,
LOiToFltFunction<T> func,
ExWF<RuntimeException> exF) |
static <T> float |
tryApplyAsFlt(T a1,
int a2,
LOiToFltFunction<T> func,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
static <T> float |
tryApplyAsFltThen(T a1,
int a2,
LOiToFltFunction<T> func,
LToFltFunction<Throwable> handler) |
default LOiToFltFunction<T> |
trying(ExWF<RuntimeException> exF) |
default LOiToFltFunction<T> |
trying(ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default LOiToFltFunction<T> |
tryingThen(LToFltFunction<Throwable> handler) |
default float |
tupleApplyAsFlt(LObjIntPair<T> args) |
static <T> LOiToFltFunction<T> |
uncurry(LFunction<T,LIntToFltFunction> func) |
default LOiToFltFunction |
untyped()
Cast that removes generics.
|
isThrowingisFunctionformatTo, isAction, isConsumer, isOperator, isPredicate, isSupplierstatic final String DESCRIPTION
default float applyAsFlt(T a1, int a2)
float applyAsFltX(T a1, int a2) throws Throwable
Implement this, but call applyAsFlt(T a1,int a2)
Throwabledefault float tupleApplyAsFlt(LObjIntPair<T> args)
default float handlingApplyAsFlt(T a1, int a2, HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
default LOiToFltFunction<T> handling(HandlingInstructions<Throwable,RuntimeException> handling)
default float applyAsFlt(T a1, int a2, @Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default LOiToFltFunction<T> trying(@Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default float applyAsFlt(T a1, int a2, @Nonnull ExWF<RuntimeException> exF)
default LOiToFltFunction<T> trying(@Nonnull ExWF<RuntimeException> exF)
default float applyAsFltThen(T a1, int a2, @Nonnull LToFltFunction<Throwable> handler)
default LOiToFltFunction<T> tryingThen(@Nonnull LToFltFunction<Throwable> handler)
default float nestingApplyAsFlt(T a1, int a2)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
default float shovingApplyAsFlt(T a1, int a2)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
static <T> float handlingApplyAsFlt(T a1,
int a2,
LOiToFltFunction<T> func,
HandlingInstructions<Throwable,RuntimeException> handling)
static <T> float tryApplyAsFlt(T a1,
int a2,
LOiToFltFunction<T> func)
static <T> float tryApplyAsFlt(T a1,
int a2,
LOiToFltFunction<T> func,
@Nonnull
ExWMF<RuntimeException> exF,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
static <T> float tryApplyAsFlt(T a1,
int a2,
LOiToFltFunction<T> func,
@Nonnull
ExWF<RuntimeException> exF)
static <T> float tryApplyAsFltThen(T a1,
int a2,
LOiToFltFunction<T> func,
@Nonnull
LToFltFunction<Throwable> handler)
default float failSafeApplyAsFlt(T a1, int a2, @Nonnull LOiToFltFunction<T> failSafe)
static <T> float failSafeApplyAsFlt(T a1,
int a2,
LOiToFltFunction<T> func,
@Nonnull
LOiToFltFunction<T> failSafe)
static <T> LOiToFltFunction<T> failSafe(LOiToFltFunction<T> func, @Nonnull LOiToFltFunction<T> failSafe)
default float nonNullApplyAsFlt(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,
LOiToFltFunction<T> func)
From-To. Intended to be used with non-capturing lambda.
static <T> void fromTill(int min_a2,
int max_a2,
T a1,
LOiToFltFunction<T> func)
From-To. Intended to be used with non-capturing lambda.
static <T> void times(int max_a2,
T a1,
LOiToFltFunction<T> func)
From-To. Intended to be used with non-capturing lambda.
default LIntToFltFunction lShrink(LIntFunction<T> left)
default LIntToFltFunction lShrinkc(T a1)
static <T> LIntToFltFunction lShrinked(LIntFunction<T> left, LOiToFltFunction<T> func)
static <T> LIntToFltFunction lShrinkedc(T a1, LOiToFltFunction<T> func)
default LToFltFunction<T> rShrink(LToIntFunction<T> right)
default LToFltFunction<T> rShrinkc(int a2)
static <T> LToFltFunction<T> rShrinked(LToIntFunction<T> right, LOiToFltFunction<T> func)
static <T> LToFltFunction<T> rShrinkedc(int a2, LOiToFltFunction<T> func)
static <T> LOiToFltFunction<T> uncurry(LFunction<T,LIntToFltFunction> func)
default LOiToFltFunction untyped()
Cast that removes generics.
default <V2> LOiToFltFunction<V2> cast()
Cast that replace generics.
static <V2,T> LOiToFltFunction<V2> cast(LOiToFltFunction<T> function)
Cast that replace generics.
default LFltSupplier capture(T a1, int a2)
Captures arguments but delays the evaluation.
static <T> LOiToFltFunction<T> constant(float r)
Creates function that always returns the same value.
@Nonnull static <T> LOiToFltFunction<T> apply1stAsFlt(@Nonnull LToFltFunction<T> func)
Captures single parameter function into this interface where only 1st parameter will be used.
@Nonnull static <T> LOiToFltFunction<T> apply2ndAsFlt(@Nonnull LIntToFltFunction func)
Captures single parameter function into this interface where only 2nd parameter will be used.
@Nonnull static <T> LOiToFltFunction<T> oiToFltFunc(@Nonnull LOiToFltFunction<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> LOiToFltFunction<T> recursive(@Nonnull LFunction<LOiToFltFunction<T>,LOiToFltFunction<T>> selfLambda)
@Nonnull static <T> LOiToFltFunction<T> oiToFltFuncThrowing(@Nonnull ExF<Throwable> exF)
@Nonnull static <T> LOiToFltFunction<T> oiToFltFuncThrowing(String message, @Nonnull ExMF<Throwable> exF)
@Nonnull static <T> LOiToFltFunction.LIntObjToFltFunc<T> intObjToFltFunc(@Nonnull LOiToFltFunction.LIntObjToFltFunc<T> lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
static <T> float call(T a1,
int a2,
@Nonnull
LOiToFltFunction<T> lambda)
@Nonnull static <T> LOiToFltFunction<T> safe()
Safe instance. That always returns the same value (as produceFloat).
@Nonnull static <T> LSupplier<LOiToFltFunction<T>> safeSupplier()
Safe instance supplier. Returns supplier of safe() instance.
@Nonnull static <T> LOiToFltFunction<T> safe(@Nullable LOiToFltFunction<T> other)
Safe wrapping. Either argument function is returned (if it is not null) or safe() instance.
@Nonnull static <T> LSupplier<LOiToFltFunction<T>> safeSupplier(@Nullable LSupplier<LOiToFltFunction<T>> supplier)
Safe supplier. Either argument supplier is returned (if it is not null) or supplier of safe() instance.
@Nonnull default <V1> LOiToFltFunction<V1> compose(@Nonnull LFunction<? super V1,? extends T> before1, @Nonnull LIntUnaryOperator before2)
Allows to manipulate the domain of the function.
static <V1,T> LOiToFltFunction<V1> composed(@Nonnull LFunction<? super V1,? extends T> before1, @Nonnull LIntUnaryOperator before2, LOiToFltFunction<T> after)
@Nonnull default <V1,V2> LToFltBiFunction<V1,V2> oiToFltFuncCompose(@Nonnull LFunction<? super V1,? extends T> before1, @Nonnull LToIntFunction<? super V2> before2)
Allows to manipulate the domain of the function.
static <V1,V2,T> LToFltBiFunction<V1,V2> composed(@Nonnull LFunction<? super V1,? extends T> before1, @Nonnull LToIntFunction<? super V2> before2, LOiToFltFunction<T> after)
@Nonnull default <V> LOiFunction<T,V> then(@Nonnull LFltFunction<? extends V> after)
Combines two functions together in a order.
@Nonnull default LOiToByteFunction<T> thenToByte(@Nonnull LFltToByteFunction after)
Combines two functions together in a order.
@Nonnull default LOiToSrtFunction<T> thenToSrt(@Nonnull LFltToSrtFunction after)
Combines two functions together in a order.
@Nonnull default LOiToIntFunction<T> thenToInt(@Nonnull LFltToIntFunction after)
Combines two functions together in a order.
@Nonnull default LOiToLongFunction<T> thenToLong(@Nonnull LFltToLongFunction after)
Combines two functions together in a order.
@Nonnull default LOiToFltFunction<T> thenToFlt(@Nonnull LFltUnaryOperator after)
Combines two functions together in a order.
@Nonnull default LOiToDblFunction<T> thenToDbl(@Nonnull LFltToDblFunction after)
Combines two functions together in a order.
@Nonnull default LOiToCharFunction<T> thenToChar(@Nonnull LFltToCharFunction after)
Combines two functions together in a order.
@Nonnull default LObjIntPredicate<T> thenToBool(@Nonnull LFltPredicate after)
Combines two functions together in a order.
static <T> float produceFloat(T a1,
int a2)
Does nothing (LOiToFltFunction) Function
static <T> float produceFloat(int a2,
T a1)
Does nothing (LOiToFltFunction.LIntObjToFltFunc) Function
default <C1,C2> void forEach(IndexedRead<C1,aType.a<T>> ia1, C1 source1, IndexedRead<C2,aType.aInt> ia2, C2 source2, LFltConsumer 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, LFltConsumer 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, LFltConsumer 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, LFltConsumer 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.