@FunctionalInterface public interface LOiToDblFunction<T> extends MetaFunction, MetaInterface.NonThrowing, OiFunction<T,aType.aDouble>, Codomain<aType.aDouble>, Domain2<aType.a<T>,aType.aInt>
Non-throwing functional interface (lambda) LOiToDblFunction for Java 8.
Type: function
Domain (lvl: 2): T a1,int a2
Co-domain: double
Special case of function that corresponds to expressions like (list, index) -> List::get
| Modifier and Type | Interface and Description |
|---|---|
static interface |
LOiToDblFunction.LIntObjToDblFunc<T>
Permutation of LOiToDblFunction for method references.
|
static class |
LOiToDblFunction.LOiToDblFunctionSingle<T> |
MetaInterface.NonThrowing, MetaInterface.Throwing<X>| Modifier and Type | Field and Description |
|---|---|
static String |
DESCRIPTION |
| Modifier and Type | Method and Description |
|---|---|
static <T> LOiToDblFunction<T> |
apply1stAsDbl(LToDblFunction<T> func)
Captures single parameter function into this interface where only 1st parameter will be used.
|
static <T> LOiToDblFunction<T> |
apply2ndAsDbl(LIntToDblFunction func)
Captures single parameter function into this interface where only 2nd parameter will be used.
|
default double |
applyAsDbl(T a1,
int a2) |
default double |
applyAsDbl(T a1,
int a2,
ExWF<RuntimeException> exF) |
default double |
applyAsDbl(T a1,
int a2,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default double |
applyAsDblThen(T a1,
int a2,
LToDblFunction<Throwable> handler) |
double |
applyAsDblX(T a1,
int a2)
Implement this, but call applyAsDbl(T a1,int a2)
|
static <T> double |
call(T a1,
int a2,
LOiToDblFunction<T> lambda) |
default LDblSupplier |
capture(T a1,
int a2)
Captures arguments but delays the evaluation.
|
default <V2> LOiToDblFunction<V2> |
cast()
Cast that replace generics.
|
static <V2,T> LOiToDblFunction<V2> |
cast(LOiToDblFunction<T> function)
Cast that replace generics.
|
default <V1> LOiToDblFunction<V1> |
compose(LFunction<? super V1,? extends T> before1,
LIntUnaryOperator before2)
Allows to manipulate the domain of the function.
|
static <V1,T> LOiToDblFunction<V1> |
composed(LFunction<? super V1,? extends T> before1,
LIntUnaryOperator before2,
LOiToDblFunction<T> after) |
static <V1,V2,T> LToDblBiFunction<V1,V2> |
composed(LFunction<? super V1,? extends T> before1,
LToIntFunction<? super V2> before2,
LOiToDblFunction<T> after) |
static <T> LOiToDblFunction<T> |
constant(double r)
Creates function that always returns the same value.
|
static <T> LOiToDblFunction<T> |
failSafe(LOiToDblFunction<T> func,
LOiToDblFunction<T> failSafe) |
default double |
failSafeApplyAsDbl(T a1,
int a2,
LOiToDblFunction<T> failSafe) |
static <T> double |
failSafeApplyAsDbl(T a1,
int a2,
LOiToDblFunction<T> func,
LOiToDblFunction<T> failSafe) |
default <C1,C2> void |
forEach(IndexedRead<C1,aType.a<T>> ia1,
C1 source1,
IndexedRead<C2,aType.aInt> ia2,
C2 source2,
LDblConsumer 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,
LOiToDblFunction<T> func)
From-To.
|
static <T> void |
fromTo(int min_a2,
int max_a2,
T a1,
LOiToDblFunction<T> func)
From-To.
|
default String |
functionalInterfaceDescription()
Returns description of the functional interface.
|
default LOiToDblFunction<T> |
handling(HandlingInstructions<Throwable,RuntimeException> handling) |
default double |
handlingApplyAsDbl(T a1,
int a2,
HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
|
static <T> double |
handlingApplyAsDbl(T a1,
int a2,
LOiToDblFunction<T> func,
HandlingInstructions<Throwable,RuntimeException> handling) |
static <T> LOiToDblFunction.LIntObjToDblFunc<T> |
intObjToDblFunc(LOiToDblFunction.LIntObjToDblFunc<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,
LDblConsumer 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,
LDblConsumer 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,
LDblConsumer consumer)
For each element (or tuple) from arguments, calls the function and passes the result to consumer.
|
default LIntToDblFunction |
lShrink(LIntFunction<T> left) |
default LIntToDblFunction |
lShrinkc(T a1) |
static <T> LIntToDblFunction |
lShrinked(LIntFunction<T> left,
LOiToDblFunction<T> func) |
static <T> LIntToDblFunction |
lShrinkedc(T a1,
LOiToDblFunction<T> func) |
default double |
nestingApplyAsDbl(T a1,
int a2)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
|
default double |
nonNullApplyAsDbl(T a1,
int a2)
Just to mirror the method: Ensures the result is not null
|
static <T> LOiToDblFunction<T> |
oiToDblFunc(LOiToDblFunction<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> LToDblBiFunction<V1,V2> |
oiToDblFuncCompose(LFunction<? super V1,? extends T> before1,
LToIntFunction<? super V2> before2)
Allows to manipulate the domain of the function.
|
static <T> LOiToDblFunction<T> |
oiToDblFuncThrowing(ExF<Throwable> exF) |
static <T> LOiToDblFunction<T> |
oiToDblFuncThrowing(String message,
ExMF<Throwable> exF) |
static <T> double |
produceDouble(int a2,
T a1)
Does nothing (LOiToDblFunction.LIntObjToDblFunc) Function
|
static <T> double |
produceDouble(T a1,
int a2)
Does nothing (LOiToDblFunction) Function
|
static <T> LOiToDblFunction<T> |
recursive(LFunction<LOiToDblFunction<T>,LOiToDblFunction<T>> selfLambda) |
default LToDblFunction<T> |
rShrink(LToIntFunction<T> right) |
default LToDblFunction<T> |
rShrinkc(int a2) |
static <T> LToDblFunction<T> |
rShrinked(LToIntFunction<T> right,
LOiToDblFunction<T> func) |
static <T> LToDblFunction<T> |
rShrinkedc(int a2,
LOiToDblFunction<T> func) |
static <T> LOiToDblFunction<T> |
safe()
Safe instance.
|
static <T> LOiToDblFunction<T> |
safe(LOiToDblFunction<T> other)
Safe wrapping.
|
static <T> LSupplier<LOiToDblFunction<T>> |
safeSupplier()
Safe instance supplier.
|
static <T> LSupplier<LOiToDblFunction<T>> |
safeSupplier(LSupplier<LOiToDblFunction<T>> supplier)
Safe supplier.
|
default double |
shovingApplyAsDbl(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(LDblFunction<? extends V> after)
Combines two functions together in a order.
|
default LObjIntPredicate<T> |
thenToBool(LDblPredicate after)
Combines two functions together in a order.
|
default LOiToByteFunction<T> |
thenToByte(LDblToByteFunction after)
Combines two functions together in a order.
|
default LOiToCharFunction<T> |
thenToChar(LDblToCharFunction after)
Combines two functions together in a order.
|
default LOiToDblFunction<T> |
thenToDbl(LDblUnaryOperator after)
Combines two functions together in a order.
|
default LOiToFltFunction<T> |
thenToFlt(LDblToFltFunction after)
Combines two functions together in a order.
|
default LOiToIntFunction<T> |
thenToInt(LDblToIntFunction after)
Combines two functions together in a order.
|
default LOiToLongFunction<T> |
thenToLong(LDblToLongFunction after)
Combines two functions together in a order.
|
default LOiToSrtFunction<T> |
thenToSrt(LDblToSrtFunction after)
Combines two functions together in a order.
|
static <T> void |
times(int max_a2,
T a1,
LOiToDblFunction<T> func)
From-To.
|
static <T> double |
tryApplyAsDbl(T a1,
int a2,
LOiToDblFunction<T> func) |
static <T> double |
tryApplyAsDbl(T a1,
int a2,
LOiToDblFunction<T> func,
ExWF<RuntimeException> exF) |
static <T> double |
tryApplyAsDbl(T a1,
int a2,
LOiToDblFunction<T> func,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
static <T> double |
tryApplyAsDblThen(T a1,
int a2,
LOiToDblFunction<T> func,
LToDblFunction<Throwable> handler) |
default LOiToDblFunction<T> |
trying(ExWF<RuntimeException> exF) |
default LOiToDblFunction<T> |
trying(ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default LOiToDblFunction<T> |
tryingThen(LToDblFunction<Throwable> handler) |
default double |
tupleApplyAsDbl(LObjIntPair<T> args) |
static <T> LOiToDblFunction<T> |
uncurry(LFunction<T,LIntToDblFunction> func) |
default LOiToDblFunction |
untyped()
Cast that removes generics.
|
isThrowingisFunctionformatTo, isAction, isConsumer, isOperator, isPredicate, isSupplierstatic final String DESCRIPTION
default double applyAsDbl(T a1, int a2)
double applyAsDblX(T a1, int a2) throws Throwable
Implement this, but call applyAsDbl(T a1,int a2)
Throwabledefault double tupleApplyAsDbl(LObjIntPair<T> args)
default double handlingApplyAsDbl(T a1, int a2, HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
default LOiToDblFunction<T> handling(HandlingInstructions<Throwable,RuntimeException> handling)
default double applyAsDbl(T a1, int a2, @Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default LOiToDblFunction<T> trying(@Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default double applyAsDbl(T a1, int a2, @Nonnull ExWF<RuntimeException> exF)
default LOiToDblFunction<T> trying(@Nonnull ExWF<RuntimeException> exF)
default double applyAsDblThen(T a1, int a2, @Nonnull LToDblFunction<Throwable> handler)
default LOiToDblFunction<T> tryingThen(@Nonnull LToDblFunction<Throwable> handler)
default double nestingApplyAsDbl(T a1, int a2)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
default double shovingApplyAsDbl(T a1, int a2)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
static <T> double handlingApplyAsDbl(T a1,
int a2,
LOiToDblFunction<T> func,
HandlingInstructions<Throwable,RuntimeException> handling)
static <T> double tryApplyAsDbl(T a1,
int a2,
LOiToDblFunction<T> func)
static <T> double tryApplyAsDbl(T a1,
int a2,
LOiToDblFunction<T> func,
@Nonnull
ExWMF<RuntimeException> exF,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
static <T> double tryApplyAsDbl(T a1,
int a2,
LOiToDblFunction<T> func,
@Nonnull
ExWF<RuntimeException> exF)
static <T> double tryApplyAsDblThen(T a1,
int a2,
LOiToDblFunction<T> func,
@Nonnull
LToDblFunction<Throwable> handler)
default double failSafeApplyAsDbl(T a1, int a2, @Nonnull LOiToDblFunction<T> failSafe)
static <T> double failSafeApplyAsDbl(T a1,
int a2,
LOiToDblFunction<T> func,
@Nonnull
LOiToDblFunction<T> failSafe)
static <T> LOiToDblFunction<T> failSafe(LOiToDblFunction<T> func, @Nonnull LOiToDblFunction<T> failSafe)
default double nonNullApplyAsDbl(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,
LOiToDblFunction<T> func)
From-To. Intended to be used with non-capturing lambda.
static <T> void fromTill(int min_a2,
int max_a2,
T a1,
LOiToDblFunction<T> func)
From-To. Intended to be used with non-capturing lambda.
static <T> void times(int max_a2,
T a1,
LOiToDblFunction<T> func)
From-To. Intended to be used with non-capturing lambda.
default LIntToDblFunction lShrink(LIntFunction<T> left)
default LIntToDblFunction lShrinkc(T a1)
static <T> LIntToDblFunction lShrinked(LIntFunction<T> left, LOiToDblFunction<T> func)
static <T> LIntToDblFunction lShrinkedc(T a1, LOiToDblFunction<T> func)
default LToDblFunction<T> rShrink(LToIntFunction<T> right)
default LToDblFunction<T> rShrinkc(int a2)
static <T> LToDblFunction<T> rShrinked(LToIntFunction<T> right, LOiToDblFunction<T> func)
static <T> LToDblFunction<T> rShrinkedc(int a2, LOiToDblFunction<T> func)
static <T> LOiToDblFunction<T> uncurry(LFunction<T,LIntToDblFunction> func)
default LOiToDblFunction untyped()
Cast that removes generics.
default <V2> LOiToDblFunction<V2> cast()
Cast that replace generics.
static <V2,T> LOiToDblFunction<V2> cast(LOiToDblFunction<T> function)
Cast that replace generics.
default LDblSupplier capture(T a1, int a2)
Captures arguments but delays the evaluation.
static <T> LOiToDblFunction<T> constant(double r)
Creates function that always returns the same value.
@Nonnull static <T> LOiToDblFunction<T> apply1stAsDbl(@Nonnull LToDblFunction<T> func)
Captures single parameter function into this interface where only 1st parameter will be used.
@Nonnull static <T> LOiToDblFunction<T> apply2ndAsDbl(@Nonnull LIntToDblFunction func)
Captures single parameter function into this interface where only 2nd parameter will be used.
@Nonnull static <T> LOiToDblFunction<T> oiToDblFunc(@Nonnull LOiToDblFunction<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> LOiToDblFunction<T> recursive(@Nonnull LFunction<LOiToDblFunction<T>,LOiToDblFunction<T>> selfLambda)
@Nonnull static <T> LOiToDblFunction<T> oiToDblFuncThrowing(@Nonnull ExF<Throwable> exF)
@Nonnull static <T> LOiToDblFunction<T> oiToDblFuncThrowing(String message, @Nonnull ExMF<Throwable> exF)
@Nonnull static <T> LOiToDblFunction.LIntObjToDblFunc<T> intObjToDblFunc(@Nonnull LOiToDblFunction.LIntObjToDblFunc<T> lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
static <T> double call(T a1,
int a2,
@Nonnull
LOiToDblFunction<T> lambda)
@Nonnull static <T> LOiToDblFunction<T> safe()
Safe instance. That always returns the same value (as produceDouble).
@Nonnull static <T> LSupplier<LOiToDblFunction<T>> safeSupplier()
Safe instance supplier. Returns supplier of safe() instance.
@Nonnull static <T> LOiToDblFunction<T> safe(@Nullable LOiToDblFunction<T> other)
Safe wrapping. Either argument function is returned (if it is not null) or safe() instance.
@Nonnull static <T> LSupplier<LOiToDblFunction<T>> safeSupplier(@Nullable LSupplier<LOiToDblFunction<T>> supplier)
Safe supplier. Either argument supplier is returned (if it is not null) or supplier of safe() instance.
@Nonnull default <V1> LOiToDblFunction<V1> compose(@Nonnull LFunction<? super V1,? extends T> before1, @Nonnull LIntUnaryOperator before2)
Allows to manipulate the domain of the function.
static <V1,T> LOiToDblFunction<V1> composed(@Nonnull LFunction<? super V1,? extends T> before1, @Nonnull LIntUnaryOperator before2, LOiToDblFunction<T> after)
@Nonnull default <V1,V2> LToDblBiFunction<V1,V2> oiToDblFuncCompose(@Nonnull LFunction<? super V1,? extends T> before1, @Nonnull LToIntFunction<? super V2> before2)
Allows to manipulate the domain of the function.
static <V1,V2,T> LToDblBiFunction<V1,V2> composed(@Nonnull LFunction<? super V1,? extends T> before1, @Nonnull LToIntFunction<? super V2> before2, LOiToDblFunction<T> after)
@Nonnull default <V> LOiFunction<T,V> then(@Nonnull LDblFunction<? extends V> after)
Combines two functions together in a order.
@Nonnull default LOiToByteFunction<T> thenToByte(@Nonnull LDblToByteFunction after)
Combines two functions together in a order.
@Nonnull default LOiToSrtFunction<T> thenToSrt(@Nonnull LDblToSrtFunction after)
Combines two functions together in a order.
@Nonnull default LOiToIntFunction<T> thenToInt(@Nonnull LDblToIntFunction after)
Combines two functions together in a order.
@Nonnull default LOiToLongFunction<T> thenToLong(@Nonnull LDblToLongFunction after)
Combines two functions together in a order.
@Nonnull default LOiToFltFunction<T> thenToFlt(@Nonnull LDblToFltFunction after)
Combines two functions together in a order.
@Nonnull default LOiToDblFunction<T> thenToDbl(@Nonnull LDblUnaryOperator after)
Combines two functions together in a order.
@Nonnull default LOiToCharFunction<T> thenToChar(@Nonnull LDblToCharFunction after)
Combines two functions together in a order.
@Nonnull default LObjIntPredicate<T> thenToBool(@Nonnull LDblPredicate after)
Combines two functions together in a order.
static <T> double produceDouble(T a1,
int a2)
Does nothing (LOiToDblFunction) Function
static <T> double produceDouble(int a2,
T a1)
Does nothing (LOiToDblFunction.LIntObjToDblFunc) Function
default <C1,C2> void forEach(IndexedRead<C1,aType.a<T>> ia1, C1 source1, IndexedRead<C2,aType.aInt> ia2, C2 source2, LDblConsumer 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, LDblConsumer 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, LDblConsumer 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, LDblConsumer 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.