@FunctionalInterface public interface LDblBinaryOperator extends java.util.function.DoubleBinaryOperator, MetaOperator, MetaInterface.NonThrowing, Codomain<aType.aDouble>, Domain2<aType.aDouble,aType.aDouble>
Non-throwing functional interface (lambda) LDblBinaryOperator for Java 8.
Type: operator
Domain (lvl: 2): double a1,double a2
Co-domain: double
| Modifier and Type | Interface and Description |
|---|---|
static class |
LDblBinaryOperator.LDblBinaryOperatorSingle |
MetaInterface.NonThrowing, MetaInterface.Throwing<X>| Modifier and Type | Field and Description |
|---|---|
static String |
DESCRIPTION |
| Modifier and Type | Method and Description |
|---|---|
static LDblBinaryOperator |
apply1stAsDbl(LDblUnaryOperator func)
Captures single parameter function into this interface where only 1st parameter will be used.
|
static LDblBinaryOperator |
apply2ndAsDbl(LDblUnaryOperator func)
Captures single parameter function into this interface where only 2nd parameter will be used.
|
default double |
applyAsDbl(double a1,
double a2) |
default double |
applyAsDbl(double a1,
double a2,
ExWF<RuntimeException> exF) |
default double |
applyAsDbl(double a1,
double a2,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default double |
applyAsDblThen(double a1,
double a2,
LToDblFunction<Throwable> handler) |
double |
applyAsDblX(double a1,
double a2)
Implement this, but call applyAsDbl(double a1,double a2)
|
default double |
applyAsDouble(double a1,
double a2)
Deprecated.
Calling this method via LDblBinaryOperator interface should be discouraged.
|
static double |
call(double a1,
double a2,
LDblBinaryOperator lambda) |
default LDblSupplier |
capture(double a1,
double a2)
Captures arguments but delays the evaluation.
|
default LDblBinaryOperator |
compose(LDblUnaryOperator before1,
LDblUnaryOperator before2)
Allows to manipulate the domain of the function.
|
static LDblBinaryOperator |
composed(LDblUnaryOperator before1,
LDblUnaryOperator before2,
LDblBinaryOperator after) |
static <V1,V2> LToDblBiFunction<V1,V2> |
composed(LToDblFunction<? super V1> before1,
LToDblFunction<? super V2> before2,
LDblBinaryOperator after) |
static LDblBinaryOperator |
constant(double r)
Creates function that always returns the same value.
|
static LDblBinaryOperator |
dblBinaryOp(LDblBinaryOperator 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> |
dblBinaryOpCompose(LToDblFunction<? super V1> before1,
LToDblFunction<? super V2> before2)
Allows to manipulate the domain of the function.
|
static LDblBinaryOperator |
dblBinaryOpThrowing(ExF<Throwable> exF) |
static LDblBinaryOperator |
dblBinaryOpThrowing(String message,
ExMF<Throwable> exF) |
static LDblBinaryOperator |
failSafe(LDblBinaryOperator func,
LDblBinaryOperator failSafe) |
default double |
failSafeApplyAsDbl(double a1,
double a2,
LDblBinaryOperator failSafe) |
static double |
failSafeApplyAsDbl(double a1,
double a2,
LDblBinaryOperator func,
LDblBinaryOperator failSafe) |
default <C1,C2> void |
forEach(IndexedRead<C1,aType.aDouble> ia1,
C1 source1,
IndexedRead<C2,aType.aDouble> ia2,
C2 source2,
LDblConsumer 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,
double a1,
double a2,
LDblBinaryOperator func)
From-To.
|
static void |
fromTo(int min_i,
int max_i,
double a1,
double a2,
LDblBinaryOperator func)
From-To.
|
default String |
functionalInterfaceDescription()
Returns description of the functional interface.
|
default LDblBinaryOperator |
handling(HandlingInstructions<Throwable,RuntimeException> handling) |
default double |
handlingApplyAsDbl(double a1,
double a2,
HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
|
static double |
handlingApplyAsDbl(double a1,
double a2,
LDblBinaryOperator func,
HandlingInstructions<Throwable,RuntimeException> handling) |
default <C1,C2,I2> void |
iterate(IndexedRead<C1,aType.aDouble> ia1,
C1 source1,
SequentialRead<C2,I2,aType.aDouble> 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.aDouble> sa1,
C1 source1,
IndexedRead<C2,aType.aDouble> 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.aDouble> sa1,
C1 source1,
SequentialRead<C2,I2,aType.aDouble> sa2,
C2 source2,
LDblConsumer consumer)
For each element (or tuple) from arguments, calls the function and passes the result to consumer.
|
default LDblUnaryOperator |
lShrink(LDblUnaryOperator left) |
default LDblUnaryOperator |
lShrinkc(double a1) |
static LDblUnaryOperator |
lShrinked(LDblUnaryOperator left,
LDblBinaryOperator func) |
static LDblUnaryOperator |
lShrinkedc(double a1,
LDblBinaryOperator func) |
static LDblBinaryOperator |
max()
Returns function that returns the higher value.
|
static LDblBinaryOperator |
maxBy(Comparator<Double> comparator)
Creates function that returns the lesser value according to the comparator.
|
static LDblBinaryOperator |
min()
Returns function that returns the lower value.
|
static LDblBinaryOperator |
minBy(Comparator<Double> comparator)
Creates function that returns the lesser value according to the comparator.
|
default double |
nestingApplyAsDbl(double a1,
double a2)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
|
default double |
nonNullApplyAsDbl(double a1,
double a2)
Just to mirror the method: Ensures the result is not null
|
static double |
produceDouble(double a1,
double a2)
Does nothing (LDblBinaryOperator) Operator
|
static LDblBinaryOperator |
recursive(LFunction<LDblBinaryOperator,LDblBinaryOperator> selfLambda) |
default LDblUnaryOperator |
rShrink(LDblUnaryOperator right) |
default LDblUnaryOperator |
rShrinkc(double a2) |
static LDblUnaryOperator |
rShrinked(LDblUnaryOperator right,
LDblBinaryOperator func) |
static LDblUnaryOperator |
rShrinkedc(double a2,
LDblBinaryOperator func) |
static LDblBinaryOperator |
safe()
Safe instance.
|
static LDblBinaryOperator |
safe(LDblBinaryOperator other)
Safe wrapping.
|
static LSupplier<LDblBinaryOperator> |
safeSupplier()
Safe instance supplier.
|
static LSupplier<LDblBinaryOperator> |
safeSupplier(LSupplier<LDblBinaryOperator> supplier)
Safe supplier.
|
default double |
shovingApplyAsDbl(double a1,
double a2)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
|
default <V> LBiDblFunction<V> |
then(LDblFunction<? extends V> after)
Combines two functions together in a order.
|
default LBiDblPredicate |
thenToBool(LDblPredicate after)
Combines two functions together in a order.
|
default LDblBinaryOperator |
thenToDbl(LDblUnaryOperator after)
Combines two functions together in a order.
|
static void |
times(int max_i,
double a1,
double a2,
LDblBinaryOperator func)
From-To.
|
static double |
tryApplyAsDbl(double a1,
double a2,
LDblBinaryOperator func) |
static double |
tryApplyAsDbl(double a1,
double a2,
LDblBinaryOperator func,
ExWF<RuntimeException> exF) |
static double |
tryApplyAsDbl(double a1,
double a2,
LDblBinaryOperator func,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
static double |
tryApplyAsDblThen(double a1,
double a2,
LDblBinaryOperator func,
LToDblFunction<Throwable> handler) |
default LDblBinaryOperator |
trying(ExWF<RuntimeException> exF) |
default LDblBinaryOperator |
trying(ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default LDblBinaryOperator |
tryingThen(LToDblFunction<Throwable> handler) |
default double |
tupleApplyAsDbl(LDblPair args) |
static LDblBinaryOperator |
uncurry(LDblFunction<LDblUnaryOperator> func) |
static LDblBinaryOperator |
wrap(java.util.function.DoubleBinaryOperator other)
Wraps JRE instance.
|
isOperatorisFunctionformatTo, isAction, isConsumer, isPredicate, isSupplierisThrowingisThrowingstatic final String DESCRIPTION
@Deprecated default double applyAsDouble(double a1, double a2)
Default implementation for JRE method that calls exception nesting method.
applyAsDouble in interface java.util.function.DoubleBinaryOperatordefault double applyAsDbl(double a1,
double a2)
double applyAsDblX(double a1,
double a2)
throws Throwable
Implement this, but call applyAsDbl(double a1,double a2)
Throwabledefault double tupleApplyAsDbl(LDblPair args)
default double handlingApplyAsDbl(double a1,
double a2,
HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
default LDblBinaryOperator handling(HandlingInstructions<Throwable,RuntimeException> handling)
default double applyAsDbl(double a1,
double a2,
@Nonnull
ExWMF<RuntimeException> exF,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
default LDblBinaryOperator trying(@Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default double applyAsDbl(double a1,
double a2,
@Nonnull
ExWF<RuntimeException> exF)
default LDblBinaryOperator trying(@Nonnull ExWF<RuntimeException> exF)
default double applyAsDblThen(double a1,
double a2,
@Nonnull
LToDblFunction<Throwable> handler)
default LDblBinaryOperator tryingThen(@Nonnull LToDblFunction<Throwable> handler)
default double nestingApplyAsDbl(double a1,
double a2)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
default double shovingApplyAsDbl(double a1,
double a2)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
static double handlingApplyAsDbl(double a1,
double a2,
LDblBinaryOperator func,
HandlingInstructions<Throwable,RuntimeException> handling)
static double tryApplyAsDbl(double a1,
double a2,
LDblBinaryOperator func)
static double tryApplyAsDbl(double a1,
double a2,
LDblBinaryOperator func,
@Nonnull
ExWMF<RuntimeException> exF,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
static double tryApplyAsDbl(double a1,
double a2,
LDblBinaryOperator func,
@Nonnull
ExWF<RuntimeException> exF)
static double tryApplyAsDblThen(double a1,
double a2,
LDblBinaryOperator func,
@Nonnull
LToDblFunction<Throwable> handler)
default double failSafeApplyAsDbl(double a1,
double a2,
@Nonnull
LDblBinaryOperator failSafe)
static double failSafeApplyAsDbl(double a1,
double a2,
LDblBinaryOperator func,
@Nonnull
LDblBinaryOperator failSafe)
static LDblBinaryOperator failSafe(LDblBinaryOperator func, @Nonnull LDblBinaryOperator failSafe)
default double nonNullApplyAsDbl(double a1,
double 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 void fromTo(int min_i,
int max_i,
double a1,
double a2,
LDblBinaryOperator func)
From-To. Intended to be used with non-capturing lambda.
static void fromTill(int min_i,
int max_i,
double a1,
double a2,
LDblBinaryOperator func)
From-To. Intended to be used with non-capturing lambda.
static void times(int max_i,
double a1,
double a2,
LDblBinaryOperator func)
From-To. Intended to be used with non-capturing lambda.
default LDblUnaryOperator lShrink(LDblUnaryOperator left)
default LDblUnaryOperator lShrinkc(double a1)
static LDblUnaryOperator lShrinked(LDblUnaryOperator left, LDblBinaryOperator func)
static LDblUnaryOperator lShrinkedc(double a1, LDblBinaryOperator func)
default LDblUnaryOperator rShrink(LDblUnaryOperator right)
default LDblUnaryOperator rShrinkc(double a2)
static LDblUnaryOperator rShrinked(LDblUnaryOperator right, LDblBinaryOperator func)
static LDblUnaryOperator rShrinkedc(double a2, LDblBinaryOperator func)
static LDblBinaryOperator uncurry(LDblFunction<LDblUnaryOperator> func)
default LDblSupplier capture(double a1, double a2)
Captures arguments but delays the evaluation.
static LDblBinaryOperator constant(double r)
Creates function that always returns the same value.
@Nonnull static LDblBinaryOperator apply1stAsDbl(@Nonnull LDblUnaryOperator func)
Captures single parameter function into this interface where only 1st parameter will be used.
@Nonnull static LDblBinaryOperator apply2ndAsDbl(@Nonnull LDblUnaryOperator func)
Captures single parameter function into this interface where only 2nd parameter will be used.
@Nonnull static LDblBinaryOperator dblBinaryOp(@Nonnull LDblBinaryOperator lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
@Nonnull static LDblBinaryOperator recursive(@Nonnull LFunction<LDblBinaryOperator,LDblBinaryOperator> selfLambda)
@Nonnull static LDblBinaryOperator dblBinaryOpThrowing(@Nonnull ExF<Throwable> exF)
@Nonnull static LDblBinaryOperator dblBinaryOpThrowing(String message, @Nonnull ExMF<Throwable> exF)
static double call(double a1,
double a2,
@Nonnull
LDblBinaryOperator lambda)
@Nonnull static LDblBinaryOperator wrap(java.util.function.DoubleBinaryOperator other)
Wraps JRE instance.
@Nonnull static LDblBinaryOperator safe()
Safe instance. That always returns the same value (as produceDouble).
@Nonnull static LSupplier<LDblBinaryOperator> safeSupplier()
Safe instance supplier. Returns supplier of safe() instance.
@Nonnull static LDblBinaryOperator safe(@Nullable LDblBinaryOperator other)
Safe wrapping. Either argument function is returned (if it is not null) or safe() instance.
@Nonnull static LSupplier<LDblBinaryOperator> safeSupplier(@Nullable LSupplier<LDblBinaryOperator> supplier)
Safe supplier. Either argument supplier is returned (if it is not null) or supplier of safe() instance.
@Nonnull static LDblBinaryOperator minBy(@Nonnull Comparator<Double> comparator)
Creates function that returns the lesser value according to the comparator.
java.util.function.BinaryOperator#minBy}@Nonnull static LDblBinaryOperator maxBy(@Nonnull Comparator<Double> comparator)
Creates function that returns the lesser value according to the comparator.
java.util.function.BinaryOperator#maxBy}@Nonnull static LDblBinaryOperator min()
Returns function that returns the lower value.
java.util.function.BinaryOperator#minBy}@Nonnull static LDblBinaryOperator max()
Returns function that returns the higher value.
java.util.function.BinaryOperator#maxBy}@Nonnull default LDblBinaryOperator compose(@Nonnull LDblUnaryOperator before1, @Nonnull LDblUnaryOperator before2)
Allows to manipulate the domain of the function.
static LDblBinaryOperator composed(@Nonnull LDblUnaryOperator before1, @Nonnull LDblUnaryOperator before2, LDblBinaryOperator after)
@Nonnull default <V1,V2> LToDblBiFunction<V1,V2> dblBinaryOpCompose(@Nonnull LToDblFunction<? super V1> before1, @Nonnull LToDblFunction<? super V2> before2)
Allows to manipulate the domain of the function.
static <V1,V2> LToDblBiFunction<V1,V2> composed(@Nonnull LToDblFunction<? super V1> before1, @Nonnull LToDblFunction<? super V2> before2, LDblBinaryOperator after)
@Nonnull default <V> LBiDblFunction<V> then(@Nonnull LDblFunction<? extends V> after)
Combines two functions together in a order.
@Nonnull default LDblBinaryOperator thenToDbl(@Nonnull LDblUnaryOperator after)
Combines two functions together in a order.
@Nonnull default LBiDblPredicate thenToBool(@Nonnull LDblPredicate after)
Combines two functions together in a order.
static double produceDouble(double a1,
double a2)
Does nothing (LDblBinaryOperator) Operator
default <C1,C2> void forEach(IndexedRead<C1,aType.aDouble> ia1, C1 source1, IndexedRead<C2,aType.aDouble> 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.aDouble> sa1, C1 source1, IndexedRead<C2,aType.aDouble> 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.aDouble> ia1, C1 source1, SequentialRead<C2,I2,aType.aDouble> 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.aDouble> sa1, C1 source1, SequentialRead<C2,I2,aType.aDouble> 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.