@FunctionalInterface public interface LBiSrtFunction<R> extends MetaFunction, MetaInterface.NonThrowing, Codomain<aType.a<R>>, Domain2<aType.aShort,aType.aShort>
Non-throwing functional interface (lambda) LBiSrtFunction for Java 8.
Type: function
Domain (lvl: 2): short a1,short a2
Co-domain: R
| Modifier and Type | Interface and Description |
|---|---|
static class |
LBiSrtFunction.LBiSrtFunctionSingle<R> |
static interface |
LBiSrtFunction.LSrt1Srt0Func<R>
Permutation of LBiSrtFunction for method references.
|
MetaInterface.NonThrowing, MetaInterface.Throwing<X>| Modifier and Type | Field and Description |
|---|---|
static String |
DESCRIPTION |
static LSupplier<String> |
NULL_VALUE_MESSAGE_SUPPLIER |
| Modifier and Type | Method and Description |
|---|---|
default LBiSrtFunction<R> |
after(LConsumer<? super R> after) |
default R |
apply(short a1,
short a2) |
default R |
apply(short a1,
short a2,
ExWF<RuntimeException> exF) |
default R |
apply(short a1,
short a2,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
static <R> LBiSrtFunction<R> |
apply1st(LSrtFunction<R> func)
Captures single parameter function into this interface where only 1st parameter will be used.
|
static <R> LBiSrtFunction<R> |
apply2nd(LSrtFunction<R> func)
Captures single parameter function into this interface where only 2nd parameter will be used.
|
default R |
applyThen(short a1,
short a2,
LFunction<Throwable,R> handler) |
R |
applyX(short a1,
short a2)
Implement this, but call apply(short a1,short a2)
|
default LBiSrtFunction<R> |
before(LBiSrtConsumer before) |
static <R> LBiSrtFunction<R> |
biSrtFunc(LBiSrtFunction<R> lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
|
default <V1,V2> LBiFunction<V1,V2,R> |
biSrtFuncCompose(LToSrtFunction<? super V1> before1,
LToSrtFunction<? super V2> before2)
Allows to manipulate the domain of the function.
|
static <R> LBiSrtFunction<R> |
biSrtFuncThrowing(ExF<Throwable> exF) |
static <R> LBiSrtFunction<R> |
biSrtFuncThrowing(String message,
ExMF<Throwable> exF) |
static <R> R |
call(short a1,
short a2,
LBiSrtFunction<R> lambda) |
default LSupplier<R> |
capture(short a1,
short a2)
Captures arguments but delays the evaluation.
|
default <V2> LBiSrtFunction<V2> |
cast()
Cast that replace generics.
|
static <V2,R> LBiSrtFunction<V2> |
cast(LBiSrtFunction<R> function)
Cast that replace generics.
|
default LBiSrtFunction<R> |
compose(LSrtUnaryOperator before1,
LSrtUnaryOperator before2)
Allows to manipulate the domain of the function.
|
static <R> LBiSrtFunction<R> |
composed(LSrtUnaryOperator before1,
LSrtUnaryOperator before2,
LBiSrtFunction<R> after) |
static <V1,V2,R> LBiFunction<V1,V2,R> |
composed(LToSrtFunction<? super V1> before1,
LToSrtFunction<? super V2> before2,
LBiSrtFunction<R> after) |
static <R> LBiSrtFunction<R> |
constant(R r)
Creates function that always returns the same value.
|
static <R> LBiSrtFunction<R> |
failSafe(LBiSrtFunction<R> func,
LBiSrtFunction<R> failSafe) |
default R |
failSafeApply(short a1,
short a2,
LBiSrtFunction<R> failSafe) |
static <R> R |
failSafeApply(short a1,
short a2,
LBiSrtFunction<R> func,
LBiSrtFunction<R> failSafe) |
default <C1,C2> void |
forEach(IndexedRead<C1,aType.aShort> ia1,
C1 source1,
IndexedRead<C2,aType.aShort> ia2,
C2 source2,
LConsumer<? super R> consumer)
For each element (or tuple) from arguments, calls the function and passes the result to consumer.
|
static <R> void |
fromTill(int min_i,
int max_i,
short a1,
short a2,
LBiSrtFunction<R> func)
From-To.
|
static <R> void |
fromTo(int min_i,
int max_i,
short a1,
short a2,
LBiSrtFunction<R> func)
From-To.
|
default String |
functionalInterfaceDescription()
Returns description of the functional interface.
|
default LBiSrtFunction<R> |
handling(HandlingInstructions<Throwable,RuntimeException> handling) |
default R |
handlingApply(short a1,
short a2,
HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
|
static <R> R |
handlingApply(short a1,
short a2,
LBiSrtFunction<R> 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,
LConsumer<? super R> 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,
LConsumer<? super R> 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,
LConsumer<? super R> consumer)
For each element (or tuple) from arguments, calls the function and passes the result to consumer.
|
default LSrtFunction<R> |
lShrink(LSrtUnaryOperator left) |
default LSrtFunction<R> |
lShrinkc(short a1) |
static <R> LSrtFunction<R> |
lShrinked(LSrtUnaryOperator left,
LBiSrtFunction<R> func) |
static <R> LSrtFunction<R> |
lShrinkedc(short a1,
LBiSrtFunction<R> func) |
default R |
nestingApply(short a1,
short a2)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
|
default LBiSrtFunction<R> |
nonNullable()
Converts to function that makes sure that the result is not null.
|
default R |
nonNullApply(short a1,
short a2)
Function call that ensures the result is not null
|
static <R> R |
produce(short a1,
short a2)
Does nothing (LBiSrtFunction) Function
|
static <R> LBiSrtFunction<R> |
recursive(LFunction<LBiSrtFunction<R>,LBiSrtFunction<R>> selfLambda) |
default LSrtFunction<R> |
rShrink(LSrtUnaryOperator right) |
default LSrtFunction<R> |
rShrinkc(short a2) |
static <R> LSrtFunction<R> |
rShrinked(LSrtUnaryOperator right,
LBiSrtFunction<R> func) |
static <R> LSrtFunction<R> |
rShrinkedc(short a2,
LBiSrtFunction<R> func) |
static <R> LBiSrtFunction<R> |
safe()
Safe instance.
|
static <R> LBiSrtFunction<R> |
safe(LBiSrtFunction<R> other)
Safe wrapping.
|
static <R> LSupplier<LBiSrtFunction<R>> |
safeSupplier()
Safe instance supplier.
|
static <R> LSupplier<LBiSrtFunction<R>> |
safeSupplier(LSupplier<LBiSrtFunction<R>> supplier)
Safe supplier.
|
default R |
shovingApply(short a1,
short a2)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
|
static <R> LBiSrtFunction.LSrt1Srt0Func<R> |
srt1Srt0Func(LBiSrtFunction.LSrt1Srt0Func<R> lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
|
default <V> LBiSrtFunction<V> |
then(LFunction<? super R,? extends V> after)
Combines two functions together in a order.
|
default LBiSrtConsumer |
thenConsume(LConsumer<? super R> after)
Combines two functions together in a order.
|
default LBiSrtPredicate |
thenToBool(LPredicate<? super R> after)
Combines two functions together in a order.
|
default LSrtBinaryOperator |
thenToSrt(LToSrtFunction<? super R> after)
Combines two functions together in a order.
|
static <R> void |
times(int max_i,
short a1,
short a2,
LBiSrtFunction<R> func)
From-To.
|
static <R> R |
tryApply(short a1,
short a2,
LBiSrtFunction<R> func) |
static <R> R |
tryApply(short a1,
short a2,
LBiSrtFunction<R> func,
ExWF<RuntimeException> exF) |
static <R> R |
tryApply(short a1,
short a2,
LBiSrtFunction<R> func,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
static <R> R |
tryApplyThen(short a1,
short a2,
LBiSrtFunction<R> func,
LFunction<Throwable,R> handler) |
default LBiSrtFunction<R> |
trying(ExWF<RuntimeException> exF) |
default LBiSrtFunction<R> |
trying(ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default LBiSrtFunction<R> |
tryingThen(LFunction<Throwable,R> handler) |
default R |
tupleApply(LSrtPair args) |
static <R> LBiSrtFunction<R> |
uncurry(LSrtFunction<LSrtFunction<R>> func) |
default LBiSrtFunction |
untyped()
Cast that removes generics.
|
isFunctionformatTo, isAction, isConsumer, isOperator, isPredicate, isSupplierisThrowingstatic final String DESCRIPTION
R applyX(short a1, short a2) throws Throwable
Implement this, but call apply(short a1,short a2)
Throwabledefault R handlingApply(short a1, short a2, HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
default LBiSrtFunction<R> handling(HandlingInstructions<Throwable,RuntimeException> handling)
default R apply(short a1, short a2, @Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default LBiSrtFunction<R> trying(@Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default R apply(short a1, short a2, @Nonnull ExWF<RuntimeException> exF)
default LBiSrtFunction<R> trying(@Nonnull ExWF<RuntimeException> exF)
default R nestingApply(short a1, short a2)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
default R shovingApply(short a1, short a2)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
static <R> R handlingApply(short a1,
short a2,
LBiSrtFunction<R> func,
HandlingInstructions<Throwable,RuntimeException> handling)
static <R> R tryApply(short a1,
short a2,
LBiSrtFunction<R> func)
static <R> R tryApply(short a1,
short a2,
LBiSrtFunction<R> func,
@Nonnull
ExWMF<RuntimeException> exF,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
static <R> R tryApply(short a1,
short a2,
LBiSrtFunction<R> func,
@Nonnull
ExWF<RuntimeException> exF)
static <R> R tryApplyThen(short a1,
short a2,
LBiSrtFunction<R> func,
@Nonnull
LFunction<Throwable,R> handler)
default R failSafeApply(short a1, short a2, @Nonnull LBiSrtFunction<R> failSafe)
static <R> R failSafeApply(short a1,
short a2,
LBiSrtFunction<R> func,
@Nonnull
LBiSrtFunction<R> failSafe)
static <R> LBiSrtFunction<R> failSafe(LBiSrtFunction<R> func, @Nonnull LBiSrtFunction<R> failSafe)
@Nonnull default R nonNullApply(short a1, short a2)
Function call that ensures the result is not null
@Nonnull default String functionalInterfaceDescription()
Returns description of the functional interface.
functionalInterfaceDescription in interface MetaFunctionalInterfacestatic <R> void fromTo(int min_i,
int max_i,
short a1,
short a2,
LBiSrtFunction<R> func)
From-To. Intended to be used with non-capturing lambda.
static <R> void fromTill(int min_i,
int max_i,
short a1,
short a2,
LBiSrtFunction<R> func)
From-To. Intended to be used with non-capturing lambda.
static <R> void times(int max_i,
short a1,
short a2,
LBiSrtFunction<R> func)
From-To. Intended to be used with non-capturing lambda.
default LSrtFunction<R> lShrink(LSrtUnaryOperator left)
default LSrtFunction<R> lShrinkc(short a1)
static <R> LSrtFunction<R> lShrinked(LSrtUnaryOperator left, LBiSrtFunction<R> func)
static <R> LSrtFunction<R> lShrinkedc(short a1, LBiSrtFunction<R> func)
default LSrtFunction<R> rShrink(LSrtUnaryOperator right)
default LSrtFunction<R> rShrinkc(short a2)
static <R> LSrtFunction<R> rShrinked(LSrtUnaryOperator right, LBiSrtFunction<R> func)
static <R> LSrtFunction<R> rShrinkedc(short a2, LBiSrtFunction<R> func)
static <R> LBiSrtFunction<R> uncurry(LSrtFunction<LSrtFunction<R>> func)
default LBiSrtFunction untyped()
Cast that removes generics.
default <V2> LBiSrtFunction<V2> cast()
Cast that replace generics.
static <V2,R> LBiSrtFunction<V2> cast(LBiSrtFunction<R> function)
Cast that replace generics.
default LSupplier<R> capture(short a1, short a2)
Captures arguments but delays the evaluation.
static <R> LBiSrtFunction<R> constant(R r)
Creates function that always returns the same value.
@Nonnull static <R> LBiSrtFunction<R> apply1st(@Nonnull LSrtFunction<R> func)
Captures single parameter function into this interface where only 1st parameter will be used.
@Nonnull static <R> LBiSrtFunction<R> apply2nd(@Nonnull LSrtFunction<R> func)
Captures single parameter function into this interface where only 2nd parameter will be used.
@Nonnull static <R> LBiSrtFunction<R> biSrtFunc(@Nonnull LBiSrtFunction<R> lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
@Nonnull static <R> LBiSrtFunction<R> recursive(@Nonnull LFunction<LBiSrtFunction<R>,LBiSrtFunction<R>> selfLambda)
@Nonnull static <R> LBiSrtFunction<R> biSrtFuncThrowing(@Nonnull ExF<Throwable> exF)
@Nonnull static <R> LBiSrtFunction<R> biSrtFuncThrowing(String message, @Nonnull ExMF<Throwable> exF)
@Nonnull static <R> LBiSrtFunction.LSrt1Srt0Func<R> srt1Srt0Func(@Nonnull LBiSrtFunction.LSrt1Srt0Func<R> lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
static <R> R call(short a1,
short a2,
@Nonnull
LBiSrtFunction<R> lambda)
@Nonnull static <R> LBiSrtFunction<R> safe()
Safe instance. That always returns the same value (as produce).
@Nonnull static <R> LSupplier<LBiSrtFunction<R>> safeSupplier()
Safe instance supplier. Returns supplier of safe() instance.
@Nonnull static <R> LBiSrtFunction<R> safe(@Nullable LBiSrtFunction<R> other)
Safe wrapping. Either argument function is returned (if it is not null) or safe() instance.
@Nonnull static <R> LSupplier<LBiSrtFunction<R>> safeSupplier(@Nullable LSupplier<LBiSrtFunction<R>> supplier)
Safe supplier. Either argument supplier is returned (if it is not null) or supplier of safe() instance.
@Nonnull default LBiSrtFunction<R> compose(@Nonnull LSrtUnaryOperator before1, @Nonnull LSrtUnaryOperator before2)
Allows to manipulate the domain of the function.
static <R> LBiSrtFunction<R> composed(@Nonnull LSrtUnaryOperator before1, @Nonnull LSrtUnaryOperator before2, LBiSrtFunction<R> after)
@Nonnull default <V1,V2> LBiFunction<V1,V2,R> biSrtFuncCompose(@Nonnull LToSrtFunction<? super V1> before1, @Nonnull LToSrtFunction<? super V2> before2)
Allows to manipulate the domain of the function.
static <V1,V2,R> LBiFunction<V1,V2,R> composed(@Nonnull LToSrtFunction<? super V1> before1, @Nonnull LToSrtFunction<? super V2> before2, LBiSrtFunction<R> after)
@Nonnull default <V> LBiSrtFunction<V> then(@Nonnull LFunction<? super R,? extends V> after)
Combines two functions together in a order.
@Nonnull default LBiSrtConsumer thenConsume(@Nonnull LConsumer<? super R> after)
Combines two functions together in a order.
@Nonnull default LBiSrtFunction<R> before(@Nonnull LBiSrtConsumer before)
@Nonnull default LSrtBinaryOperator thenToSrt(@Nonnull LToSrtFunction<? super R> after)
Combines two functions together in a order.
@Nonnull default LBiSrtPredicate thenToBool(@Nonnull LPredicate<? super R> after)
Combines two functions together in a order.
@Nonnull default LBiSrtFunction<R> nonNullable()
Converts to function that makes sure that the result is not null.
static <R> R produce(short a1,
short a2)
Does nothing (LBiSrtFunction) Function
default <C1,C2> void forEach(IndexedRead<C1,aType.aShort> ia1, C1 source1, IndexedRead<C2,aType.aShort> ia2, C2 source2, LConsumer<? super R> 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, LConsumer<? super R> 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, LConsumer<? super R> 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, LConsumer<? super R> 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.