@FunctionalInterface public interface LSrtBinaryOperator extends MetaOperator, MetaInterface.NonThrowing, Codomain<aType.aShort>, Domain2<aType.aShort,aType.aShort>
Non-throwing functional interface (lambda) LSrtBinaryOperator for Java 8.
Type: operator
Domain (lvl: 2): short a1,short a2
Co-domain: short
| Modifier and Type | Interface and Description |
|---|---|
static class |
LSrtBinaryOperator.LSrtBinaryOperatorSingle |
MetaInterface.NonThrowing, MetaInterface.Throwing<X>| Modifier and Type | Field and Description |
|---|---|
static String |
DESCRIPTION |
| Modifier and Type | Method and Description |
|---|---|
static LSrtBinaryOperator |
apply1stAsSrt(LSrtUnaryOperator func)
Captures single parameter function into this interface where only 1st parameter will be used.
|
static LSrtBinaryOperator |
apply2ndAsSrt(LSrtUnaryOperator func)
Captures single parameter function into this interface where only 2nd parameter will be used.
|
default short |
applyAsSrt(short a1,
short a2) |
default short |
applyAsSrt(short a1,
short a2,
ExWF<RuntimeException> exF) |
default short |
applyAsSrt(short a1,
short a2,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default short |
applyAsSrtThen(short a1,
short a2,
LToSrtFunction<Throwable> handler) |
short |
applyAsSrtX(short a1,
short a2)
Implement this, but call applyAsSrt(short a1,short a2)
|
static short |
call(short a1,
short a2,
LSrtBinaryOperator lambda) |
default LSrtSupplier |
capture(short a1,
short a2)
Captures arguments but delays the evaluation.
|
default LSrtBinaryOperator |
compose(LSrtUnaryOperator before1,
LSrtUnaryOperator before2)
Allows to manipulate the domain of the function.
|
static LSrtBinaryOperator |
composed(LSrtUnaryOperator before1,
LSrtUnaryOperator before2,
LSrtBinaryOperator after) |
static <V1,V2> LToSrtBiFunction<V1,V2> |
composed(LToSrtFunction<? super V1> before1,
LToSrtFunction<? super V2> before2,
LSrtBinaryOperator after) |
static LSrtBinaryOperator |
constant(short r)
Creates function that always returns the same value.
|
static LSrtBinaryOperator |
failSafe(LSrtBinaryOperator func,
LSrtBinaryOperator failSafe) |
default short |
failSafeApplyAsSrt(short a1,
short a2,
LSrtBinaryOperator failSafe) |
static short |
failSafeApplyAsSrt(short a1,
short a2,
LSrtBinaryOperator func,
LSrtBinaryOperator failSafe) |
default <C1,C2> void |
forEach(IndexedRead<C1,aType.aShort> ia1,
C1 source1,
IndexedRead<C2,aType.aShort> ia2,
C2 source2,
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 a1,
short a2,
LSrtBinaryOperator func)
From-To.
|
static void |
fromTo(int min_i,
int max_i,
short a1,
short a2,
LSrtBinaryOperator func)
From-To.
|
default String |
functionalInterfaceDescription()
Returns description of the functional interface.
|
default LSrtBinaryOperator |
handling(HandlingInstructions<Throwable,RuntimeException> handling) |
default short |
handlingApplyAsSrt(short a1,
short a2,
HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
|
static short |
handlingApplyAsSrt(short a1,
short a2,
LSrtBinaryOperator func,
HandlingInstructions<Throwable,RuntimeException> handling) |
default <C1,C2,I2> void |
iterate(IndexedRead<C1,aType.aShort> ia1,
C1 source1,
SequentialRead<C2,I2,aType.aShort> 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.aShort> sa1,
C1 source1,
IndexedRead<C2,aType.aShort> 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.aShort> sa1,
C1 source1,
SequentialRead<C2,I2,aType.aShort> sa2,
C2 source2,
LSrtConsumer consumer)
For each element (or tuple) from arguments, calls the function and passes the result to consumer.
|
default LSrtUnaryOperator |
lShrink(LSrtUnaryOperator left) |
default LSrtUnaryOperator |
lShrinkc(short a1) |
static LSrtUnaryOperator |
lShrinked(LSrtUnaryOperator left,
LSrtBinaryOperator func) |
static LSrtUnaryOperator |
lShrinkedc(short a1,
LSrtBinaryOperator func) |
static LSrtBinaryOperator |
max()
Returns function that returns the higher value.
|
static LSrtBinaryOperator |
maxBy(Comparator<Short> comparator)
Creates function that returns the lesser value according to the comparator.
|
static LSrtBinaryOperator |
min()
Returns function that returns the lower value.
|
static LSrtBinaryOperator |
minBy(Comparator<Short> comparator)
Creates function that returns the lesser value according to the comparator.
|
default short |
nestingApplyAsSrt(short a1,
short a2)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
|
default short |
nonNullApplyAsSrt(short a1,
short a2)
Just to mirror the method: Ensures the result is not null
|
static short |
produceShort(short a1,
short a2)
Does nothing (LSrtBinaryOperator) Operator
|
static LSrtBinaryOperator |
recursive(LFunction<LSrtBinaryOperator,LSrtBinaryOperator> selfLambda) |
default LSrtUnaryOperator |
rShrink(LSrtUnaryOperator right) |
default LSrtUnaryOperator |
rShrinkc(short a2) |
static LSrtUnaryOperator |
rShrinked(LSrtUnaryOperator right,
LSrtBinaryOperator func) |
static LSrtUnaryOperator |
rShrinkedc(short a2,
LSrtBinaryOperator func) |
static LSrtBinaryOperator |
safe()
Safe instance.
|
static LSrtBinaryOperator |
safe(LSrtBinaryOperator other)
Safe wrapping.
|
static LSupplier<LSrtBinaryOperator> |
safeSupplier()
Safe instance supplier.
|
static LSupplier<LSrtBinaryOperator> |
safeSupplier(LSupplier<LSrtBinaryOperator> supplier)
Safe supplier.
|
default short |
shovingApplyAsSrt(short a1,
short a2)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
|
static LSrtBinaryOperator |
srtBinaryOp(LSrtBinaryOperator 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> |
srtBinaryOpCompose(LToSrtFunction<? super V1> before1,
LToSrtFunction<? super V2> before2)
Allows to manipulate the domain of the function.
|
static LSrtBinaryOperator |
srtBinaryOpThrowing(ExF<Throwable> exF) |
static LSrtBinaryOperator |
srtBinaryOpThrowing(String message,
ExMF<Throwable> exF) |
default <V> LBiSrtFunction<V> |
then(LSrtFunction<? extends V> after)
Combines two functions together in a order.
|
default LBiSrtPredicate |
thenToBool(LSrtPredicate after)
Combines two functions together in a order.
|
default LSrtBinaryOperator |
thenToSrt(LSrtUnaryOperator after)
Combines two functions together in a order.
|
static void |
times(int max_i,
short a1,
short a2,
LSrtBinaryOperator func)
From-To.
|
static short |
tryApplyAsSrt(short a1,
short a2,
LSrtBinaryOperator func) |
static short |
tryApplyAsSrt(short a1,
short a2,
LSrtBinaryOperator func,
ExWF<RuntimeException> exF) |
static short |
tryApplyAsSrt(short a1,
short a2,
LSrtBinaryOperator func,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
static short |
tryApplyAsSrtThen(short a1,
short a2,
LSrtBinaryOperator func,
LToSrtFunction<Throwable> handler) |
default LSrtBinaryOperator |
trying(ExWF<RuntimeException> exF) |
default LSrtBinaryOperator |
trying(ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default LSrtBinaryOperator |
tryingThen(LToSrtFunction<Throwable> handler) |
default short |
tupleApplyAsSrt(LSrtPair args) |
static LSrtBinaryOperator |
uncurry(LSrtFunction<LSrtUnaryOperator> func) |
isOperatorisFunctionformatTo, isAction, isConsumer, isPredicate, isSupplierisThrowingisThrowingstatic final String DESCRIPTION
default short applyAsSrt(short a1,
short a2)
short applyAsSrtX(short a1,
short a2)
throws Throwable
Implement this, but call applyAsSrt(short a1,short a2)
Throwabledefault short tupleApplyAsSrt(LSrtPair args)
default short handlingApplyAsSrt(short a1,
short a2,
HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
default LSrtBinaryOperator handling(HandlingInstructions<Throwable,RuntimeException> handling)
default short applyAsSrt(short a1,
short a2,
@Nonnull
ExWMF<RuntimeException> exF,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
default LSrtBinaryOperator trying(@Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default short applyAsSrt(short a1,
short a2,
@Nonnull
ExWF<RuntimeException> exF)
default LSrtBinaryOperator trying(@Nonnull ExWF<RuntimeException> exF)
default short applyAsSrtThen(short a1,
short a2,
@Nonnull
LToSrtFunction<Throwable> handler)
default LSrtBinaryOperator tryingThen(@Nonnull LToSrtFunction<Throwable> handler)
default short nestingApplyAsSrt(short a1,
short a2)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
default short shovingApplyAsSrt(short a1,
short a2)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
static short handlingApplyAsSrt(short a1,
short a2,
LSrtBinaryOperator func,
HandlingInstructions<Throwable,RuntimeException> handling)
static short tryApplyAsSrt(short a1,
short a2,
LSrtBinaryOperator func)
static short tryApplyAsSrt(short a1,
short a2,
LSrtBinaryOperator func,
@Nonnull
ExWMF<RuntimeException> exF,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
static short tryApplyAsSrt(short a1,
short a2,
LSrtBinaryOperator func,
@Nonnull
ExWF<RuntimeException> exF)
static short tryApplyAsSrtThen(short a1,
short a2,
LSrtBinaryOperator func,
@Nonnull
LToSrtFunction<Throwable> handler)
default short failSafeApplyAsSrt(short a1,
short a2,
@Nonnull
LSrtBinaryOperator failSafe)
static short failSafeApplyAsSrt(short a1,
short a2,
LSrtBinaryOperator func,
@Nonnull
LSrtBinaryOperator failSafe)
static LSrtBinaryOperator failSafe(LSrtBinaryOperator func, @Nonnull LSrtBinaryOperator failSafe)
default short nonNullApplyAsSrt(short a1,
short 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,
short a1,
short a2,
LSrtBinaryOperator func)
From-To. Intended to be used with non-capturing lambda.
static void fromTill(int min_i,
int max_i,
short a1,
short a2,
LSrtBinaryOperator func)
From-To. Intended to be used with non-capturing lambda.
static void times(int max_i,
short a1,
short a2,
LSrtBinaryOperator func)
From-To. Intended to be used with non-capturing lambda.
default LSrtUnaryOperator lShrink(LSrtUnaryOperator left)
default LSrtUnaryOperator lShrinkc(short a1)
static LSrtUnaryOperator lShrinked(LSrtUnaryOperator left, LSrtBinaryOperator func)
static LSrtUnaryOperator lShrinkedc(short a1, LSrtBinaryOperator func)
default LSrtUnaryOperator rShrink(LSrtUnaryOperator right)
default LSrtUnaryOperator rShrinkc(short a2)
static LSrtUnaryOperator rShrinked(LSrtUnaryOperator right, LSrtBinaryOperator func)
static LSrtUnaryOperator rShrinkedc(short a2, LSrtBinaryOperator func)
static LSrtBinaryOperator uncurry(LSrtFunction<LSrtUnaryOperator> func)
default LSrtSupplier capture(short a1, short a2)
Captures arguments but delays the evaluation.
static LSrtBinaryOperator constant(short r)
Creates function that always returns the same value.
@Nonnull static LSrtBinaryOperator apply1stAsSrt(@Nonnull LSrtUnaryOperator func)
Captures single parameter function into this interface where only 1st parameter will be used.
@Nonnull static LSrtBinaryOperator apply2ndAsSrt(@Nonnull LSrtUnaryOperator func)
Captures single parameter function into this interface where only 2nd parameter will be used.
@Nonnull static LSrtBinaryOperator srtBinaryOp(@Nonnull LSrtBinaryOperator lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
@Nonnull static LSrtBinaryOperator recursive(@Nonnull LFunction<LSrtBinaryOperator,LSrtBinaryOperator> selfLambda)
@Nonnull static LSrtBinaryOperator srtBinaryOpThrowing(@Nonnull ExF<Throwable> exF)
@Nonnull static LSrtBinaryOperator srtBinaryOpThrowing(String message, @Nonnull ExMF<Throwable> exF)
static short call(short a1,
short a2,
@Nonnull
LSrtBinaryOperator lambda)
@Nonnull static LSrtBinaryOperator safe()
Safe instance. That always returns the same value (as produceShort).
@Nonnull static LSupplier<LSrtBinaryOperator> safeSupplier()
Safe instance supplier. Returns supplier of safe() instance.
@Nonnull static LSrtBinaryOperator safe(@Nullable LSrtBinaryOperator other)
Safe wrapping. Either argument function is returned (if it is not null) or safe() instance.
@Nonnull static LSupplier<LSrtBinaryOperator> safeSupplier(@Nullable LSupplier<LSrtBinaryOperator> supplier)
Safe supplier. Either argument supplier is returned (if it is not null) or supplier of safe() instance.
@Nonnull static LSrtBinaryOperator minBy(@Nonnull Comparator<Short> comparator)
Creates function that returns the lesser value according to the comparator.
java.util.function.BinaryOperator#minBy}@Nonnull static LSrtBinaryOperator maxBy(@Nonnull Comparator<Short> comparator)
Creates function that returns the lesser value according to the comparator.
java.util.function.BinaryOperator#maxBy}@Nonnull static LSrtBinaryOperator min()
Returns function that returns the lower value.
java.util.function.BinaryOperator#minBy}@Nonnull static LSrtBinaryOperator max()
Returns function that returns the higher value.
java.util.function.BinaryOperator#maxBy}@Nonnull default LSrtBinaryOperator compose(@Nonnull LSrtUnaryOperator before1, @Nonnull LSrtUnaryOperator before2)
Allows to manipulate the domain of the function.
static LSrtBinaryOperator composed(@Nonnull LSrtUnaryOperator before1, @Nonnull LSrtUnaryOperator before2, LSrtBinaryOperator after)
@Nonnull default <V1,V2> LToSrtBiFunction<V1,V2> srtBinaryOpCompose(@Nonnull LToSrtFunction<? super V1> before1, @Nonnull LToSrtFunction<? super V2> before2)
Allows to manipulate the domain of the function.
static <V1,V2> LToSrtBiFunction<V1,V2> composed(@Nonnull LToSrtFunction<? super V1> before1, @Nonnull LToSrtFunction<? super V2> before2, LSrtBinaryOperator after)
@Nonnull default <V> LBiSrtFunction<V> then(@Nonnull LSrtFunction<? extends V> after)
Combines two functions together in a order.
@Nonnull default LSrtBinaryOperator thenToSrt(@Nonnull LSrtUnaryOperator after)
Combines two functions together in a order.
@Nonnull default LBiSrtPredicate thenToBool(@Nonnull LSrtPredicate after)
Combines two functions together in a order.
static short produceShort(short a1,
short a2)
Does nothing (LSrtBinaryOperator) Operator
default <C1,C2> void forEach(IndexedRead<C1,aType.aShort> ia1, C1 source1, IndexedRead<C2,aType.aShort> 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.aShort> sa1, C1 source1, IndexedRead<C2,aType.aShort> 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.aShort> ia1, C1 source1, SequentialRead<C2,I2,aType.aShort> 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.aShort> sa1, C1 source1, SequentialRead<C2,I2,aType.aShort> 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.