@FunctionalInterface public interface LBinaryOperator<T> extends java.util.function.BinaryOperator<T>, MetaOperator, MetaInterface.NonThrowing, Codomain<aType.a<T>>, Domain2<aType.a<T>,aType.a<T>>, LBiFunction<T,T,T>
Non-throwing functional interface (lambda) LBinaryOperator for Java 8.
Type: operator
Domain (lvl: 2): T a1,T a2
Co-domain: T
| Modifier and Type | Interface and Description |
|---|---|
static class |
LBinaryOperator.LBinaryOperatorSingle<T> |
LBiFunction.LBiFunctionSingle<T1,T2,R>, LBiFunction.LObj1Obj0Func<T2,T1,R>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 T |
apply(T a1,
T a2,
ExWF<RuntimeException> exF) |
default T |
apply(T a1,
T a2,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
static <T> LBinaryOperator<T> |
apply1st(LUnaryOperator<T> func)
Captures single parameter function into this interface where only 1st parameter will be used.
|
static <T> LBinaryOperator<T> |
apply2nd(LUnaryOperator<T> func)
Captures single parameter function into this interface where only 2nd parameter will be used.
|
default T |
applyThen(T a1,
T a2,
LFunction<Throwable,T> handler) |
static <T> LBinaryOperator<T> |
binaryOp(LBinaryOperator<T> lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
|
static <T> LBinaryOperator<T> |
binaryOpThrowing(ExF<Throwable> exF) |
static <T> LBinaryOperator<T> |
binaryOpThrowing(String message,
ExMF<Throwable> exF) |
static <T> T |
call(T a1,
T a2,
LBinaryOperator<T> lambda) |
default LSupplier<T> |
capture(T a1,
T a2)
Captures arguments but delays the evaluation.
|
default LBinaryOperator |
cast()
Cast that replace generics.
|
static <T> LBinaryOperator |
cast(LBinaryOperator<T> function)
Cast that replace generics.
|
static <T> LBinaryOperator<T> |
constant(T r)
Creates function that always returns the same value.
|
static <T> LBinaryOperator<T> |
failSafe(LBinaryOperator<T> func,
LBinaryOperator<T> failSafe) |
default T |
failSafeApply(T a1,
T a2,
LBinaryOperator<T> failSafe) |
static <T> T |
failSafeApply(T a1,
T a2,
LBinaryOperator<T> func,
LBinaryOperator<T> failSafe) |
default <C1,C2> void |
forEach(IndexedRead<C1,aType.a<T>> ia1,
C1 source1,
IndexedRead<C2,aType.a<T>> ia2,
C2 source2,
LConsumer<? super T> consumer)
For each element (or tuple) from arguments, calls the function and passes the result to consumer.
|
static <T> void |
fromTill(int min_i,
int max_i,
T a1,
T a2,
LBinaryOperator<T> func)
From-To.
|
static <T> void |
fromTo(int min_i,
int max_i,
T a1,
T a2,
LBinaryOperator<T> func)
From-To.
|
default String |
functionalInterfaceDescription()
Returns description of the functional interface.
|
default LBinaryOperator<T> |
handling(HandlingInstructions<Throwable,RuntimeException> handling) |
default T |
handlingApply(T a1,
T a2,
HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
|
static <T> T |
handlingApply(T a1,
T a2,
LBinaryOperator<T> func,
HandlingInstructions<Throwable,RuntimeException> handling) |
default <C1,C2,I2> void |
iterate(IndexedRead<C1,aType.a<T>> ia1,
C1 source1,
SequentialRead<C2,I2,aType.a<T>> sa2,
C2 source2,
LConsumer<? super T> 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.a<T>> ia2,
C2 source2,
LConsumer<? super T> 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.a<T>> sa2,
C2 source2,
LConsumer<? super T> consumer)
For each element (or tuple) from arguments, calls the function and passes the result to consumer.
|
default LUnaryOperator<T> |
lShrink(LUnaryOperator<T> left) |
default LUnaryOperator<T> |
lShrinkc(T a1) |
static <T> LUnaryOperator<T> |
lShrinked(LUnaryOperator<T> left,
LBinaryOperator<T> func) |
static <T> LUnaryOperator<T> |
lShrinkedc(T a1,
LBinaryOperator<T> func) |
static <T> LBinaryOperator<T> |
maxBy(Comparator<T> comparator)
Creates function that returns the lesser value according to the comparator.
|
static <T> LBinaryOperator<T> |
minBy(Comparator<T> comparator)
Creates function that returns the lesser value according to the comparator.
|
default T |
nestingApply(T a1,
T a2)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
|
default LBinaryOperator<T> |
nonNullable()
Converts to function that makes sure that the result is not null.
|
default T |
nonNullApply(T a1,
T a2)
Function call that ensures the result is not null
|
static <T> T |
produce(T a1,
T a2)
Does nothing (LBinaryOperator) Operator
|
static <T> LBinaryOperator<T> |
recursive(LFunction<LBinaryOperator<T>,LBinaryOperator<T>> selfLambda) |
default LUnaryOperator<T> |
rShrink(LUnaryOperator<T> right) |
default LUnaryOperator<T> |
rShrinkc(T a2) |
static <T> LUnaryOperator<T> |
rShrinked(LUnaryOperator<T> right,
LBinaryOperator<T> func) |
static <T> LUnaryOperator<T> |
rShrinkedc(T a2,
LBinaryOperator<T> func) |
static <T> LBinaryOperator<T> |
safe()
Safe instance.
|
static <T> LBinaryOperator<T> |
safe(LBinaryOperator<T> other)
Safe wrapping.
|
static <T> LSupplier<LBinaryOperator<T>> |
safeSupplier()
Safe instance supplier.
|
static <T> LSupplier<LBinaryOperator<T>> |
safeSupplier(LSupplier<LBinaryOperator<T>> supplier)
Safe supplier.
|
default T |
shovingApply(T a1,
T a2)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
|
default <V> LBiFunction<T,T,V> |
then(LFunction<? super T,? extends V> after)
Combines two functions together in a order.
|
default LBiPredicate<T,T> |
thenToBool(LPredicate<? super T> after)
Combines two functions together in a order.
|
default LToByteBiFunction<T,T> |
thenToByte(LToByteFunction<? super T> after)
Combines two functions together in a order.
|
default LToCharBiFunction<T,T> |
thenToChar(LToCharFunction<? super T> after)
Combines two functions together in a order.
|
default LToDblBiFunction<T,T> |
thenToDbl(LToDblFunction<? super T> after)
Combines two functions together in a order.
|
default LToFltBiFunction<T,T> |
thenToFlt(LToFltFunction<? super T> after)
Combines two functions together in a order.
|
default LToIntBiFunction<T,T> |
thenToInt(LToIntFunction<? super T> after)
Combines two functions together in a order.
|
default LToLongBiFunction<T,T> |
thenToLong(LToLongFunction<? super T> after)
Combines two functions together in a order.
|
default LToSrtBiFunction<T,T> |
thenToSrt(LToSrtFunction<? super T> after)
Combines two functions together in a order.
|
static <T> void |
times(int max_i,
T a1,
T a2,
LBinaryOperator<T> func)
From-To.
|
static <T> T |
tryApply(T a1,
T a2,
LBinaryOperator<T> func) |
static <T> T |
tryApply(T a1,
T a2,
LBinaryOperator<T> func,
ExWF<RuntimeException> exF) |
static <T> T |
tryApply(T a1,
T a2,
LBinaryOperator<T> func,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
static <T> T |
tryApplyThen(T a1,
T a2,
LBinaryOperator<T> func,
LFunction<Throwable,T> handler) |
default LBinaryOperator<T> |
trying(ExWF<RuntimeException> exF) |
default LBinaryOperator<T> |
trying(ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default LBinaryOperator<T> |
tryingThen(LFunction<Throwable,T> handler) |
default T |
tupleApply(LPair<T,T> args) |
static <T> LBinaryOperator<T> |
uncurry(LFunction<T,LUnaryOperator<T>> func) |
default LBinaryOperator |
untyped()
Cast that removes generics.
|
static <T> LBinaryOperator<T> |
wrap(java.util.function.BinaryOperator<T> other)
Wraps JRE instance.
|
maxBy, minByisOperatorafter, apply, apply1st, apply2nd, applyX, before, biFunc, biFuncThrowing, biFuncThrowing, call, cast, compose, composed, failSafe, failSafeApply, failSafeApply, fromTill, fromTo, handlingApply, lShrink, lShrinked, lShrinkedc, obj1Obj0Func, recursive, rShrink, rShrinked, rShrinkedc, safe, safeSupplier, thenConsume, times, tryApply, tryApply, tryApply, tryApplyThen, uncurry, wrapandThenisFunctionformatTo, isAction, isConsumer, isPredicate, isSupplierisThrowingstatic final String DESCRIPTION
default T tupleApply(LPair<T,T> args)
tupleApply in interface LBiFunction<T,T,T>default T handlingApply(T a1, T a2, HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
handlingApply in interface LBiFunction<T,T,T>default LBinaryOperator<T> handling(HandlingInstructions<Throwable,RuntimeException> handling)
handling in interface LBiFunction<T,T,T>default T apply(T a1, T a2, @Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
apply in interface LBiFunction<T,T,T>default LBinaryOperator<T> trying(@Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
trying in interface LBiFunction<T,T,T>default T apply(T a1, T a2, @Nonnull ExWF<RuntimeException> exF)
apply in interface LBiFunction<T,T,T>default LBinaryOperator<T> trying(@Nonnull ExWF<RuntimeException> exF)
trying in interface LBiFunction<T,T,T>default T applyThen(T a1, T a2, @Nonnull LFunction<Throwable,T> handler)
applyThen in interface LBiFunction<T,T,T>default LBinaryOperator<T> tryingThen(@Nonnull LFunction<Throwable,T> handler)
tryingThen in interface LBiFunction<T,T,T>default T nestingApply(T a1, T a2)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
nestingApply in interface LBiFunction<T,T,T>default T shovingApply(T a1, T a2)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
shovingApply in interface LBiFunction<T,T,T>static <T> T handlingApply(T a1,
T a2,
LBinaryOperator<T> func,
HandlingInstructions<Throwable,RuntimeException> handling)
static <T> T tryApply(T a1,
T a2,
LBinaryOperator<T> func)
static <T> T tryApply(T a1,
T a2,
LBinaryOperator<T> func,
@Nonnull
ExWMF<RuntimeException> exF,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
static <T> T tryApply(T a1,
T a2,
LBinaryOperator<T> func,
@Nonnull
ExWF<RuntimeException> exF)
static <T> T tryApplyThen(T a1,
T a2,
LBinaryOperator<T> func,
@Nonnull
LFunction<Throwable,T> handler)
static <T> T failSafeApply(T a1,
T a2,
LBinaryOperator<T> func,
@Nonnull
LBinaryOperator<T> failSafe)
static <T> LBinaryOperator<T> failSafe(LBinaryOperator<T> func, @Nonnull LBinaryOperator<T> failSafe)
@Nonnull default T nonNullApply(T a1, T a2)
Function call that ensures the result is not null
nonNullApply in interface LBiFunction<T,T,T>@Nonnull default String functionalInterfaceDescription()
Returns description of the functional interface.
functionalInterfaceDescription in interface LBiFunction<T,T,T>functionalInterfaceDescription in interface MetaFunctionalInterfacestatic <T> void fromTo(int min_i,
int max_i,
T a1,
T a2,
LBinaryOperator<T> func)
From-To. Intended to be used with non-capturing lambda.
static <T> void fromTill(int min_i,
int max_i,
T a1,
T a2,
LBinaryOperator<T> func)
From-To. Intended to be used with non-capturing lambda.
static <T> void times(int max_i,
T a1,
T a2,
LBinaryOperator<T> func)
From-To. Intended to be used with non-capturing lambda.
default LUnaryOperator<T> lShrink(LUnaryOperator<T> left)
default LUnaryOperator<T> lShrinkc(T a1)
lShrinkc in interface LBiFunction<T,T,T>static <T> LUnaryOperator<T> lShrinked(LUnaryOperator<T> left, LBinaryOperator<T> func)
static <T> LUnaryOperator<T> lShrinkedc(T a1, LBinaryOperator<T> func)
default LUnaryOperator<T> rShrink(LUnaryOperator<T> right)
default LUnaryOperator<T> rShrinkc(T a2)
rShrinkc in interface LBiFunction<T,T,T>static <T> LUnaryOperator<T> rShrinked(LUnaryOperator<T> right, LBinaryOperator<T> func)
static <T> LUnaryOperator<T> rShrinkedc(T a2, LBinaryOperator<T> func)
static <T> LBinaryOperator<T> uncurry(LFunction<T,LUnaryOperator<T>> func)
default LBinaryOperator untyped()
Cast that removes generics.
untyped in interface LBiFunction<T,T,T>default LBinaryOperator cast()
Cast that replace generics.
cast in interface LBiFunction<T,T,T>static <T> LBinaryOperator cast(LBinaryOperator<T> function)
Cast that replace generics.
default LSupplier<T> capture(T a1, T a2)
Captures arguments but delays the evaluation.
capture in interface LBiFunction<T,T,T>static <T> LBinaryOperator<T> constant(T r)
Creates function that always returns the same value.
constant in interface LBiFunction<T,T,T>@Nonnull static <T> LBinaryOperator<T> apply1st(@Nonnull LUnaryOperator<T> func)
Captures single parameter function into this interface where only 1st parameter will be used.
@Nonnull static <T> LBinaryOperator<T> apply2nd(@Nonnull LUnaryOperator<T> func)
Captures single parameter function into this interface where only 2nd parameter will be used.
@Nonnull static <T> LBinaryOperator<T> binaryOp(@Nonnull LBinaryOperator<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> LBinaryOperator<T> recursive(@Nonnull LFunction<LBinaryOperator<T>,LBinaryOperator<T>> selfLambda)
@Nonnull static <T> LBinaryOperator<T> binaryOpThrowing(@Nonnull ExF<Throwable> exF)
@Nonnull static <T> LBinaryOperator<T> binaryOpThrowing(String message, @Nonnull ExMF<Throwable> exF)
static <T> T call(T a1,
T a2,
@Nonnull
LBinaryOperator<T> lambda)
@Nonnull static <T> LBinaryOperator<T> wrap(java.util.function.BinaryOperator<T> other)
Wraps JRE instance.
@Nonnull static <T> LBinaryOperator<T> safe()
Safe instance. That always returns the same value (as produce).
safe in interface LBiFunction<T,T,T>@Nonnull static <T> LSupplier<LBinaryOperator<T>> safeSupplier()
Safe instance supplier. Returns supplier of safe() instance.
safeSupplier in interface LBiFunction<T,T,T>@Nonnull static <T> LBinaryOperator<T> safe(@Nullable LBinaryOperator<T> other)
Safe wrapping. Either argument function is returned (if it is not null) or safe() instance.
@Nonnull static <T> LSupplier<LBinaryOperator<T>> safeSupplier(@Nullable LSupplier<LBinaryOperator<T>> supplier)
Safe supplier. Either argument supplier is returned (if it is not null) or supplier of safe() instance.
@Nonnull static <T> LBinaryOperator<T> minBy(@Nonnull Comparator<T> comparator)
Creates function that returns the lesser value according to the comparator.
java.util.function.BinaryOperator#minBy}@Nonnull static <T> LBinaryOperator<T> maxBy(@Nonnull Comparator<T> comparator)
Creates function that returns the lesser value according to the comparator.
java.util.function.BinaryOperator#maxBy}@Nonnull default <V> LBiFunction<T,T,V> then(@Nonnull LFunction<? super T,? extends V> after)
Combines two functions together in a order.
then in interface LBiFunction<T,T,T>@Nonnull default LToByteBiFunction<T,T> thenToByte(@Nonnull LToByteFunction<? super T> after)
Combines two functions together in a order.
thenToByte in interface LBiFunction<T,T,T>@Nonnull default LToSrtBiFunction<T,T> thenToSrt(@Nonnull LToSrtFunction<? super T> after)
Combines two functions together in a order.
thenToSrt in interface LBiFunction<T,T,T>@Nonnull default LToIntBiFunction<T,T> thenToInt(@Nonnull LToIntFunction<? super T> after)
Combines two functions together in a order.
thenToInt in interface LBiFunction<T,T,T>@Nonnull default LToLongBiFunction<T,T> thenToLong(@Nonnull LToLongFunction<? super T> after)
Combines two functions together in a order.
thenToLong in interface LBiFunction<T,T,T>@Nonnull default LToFltBiFunction<T,T> thenToFlt(@Nonnull LToFltFunction<? super T> after)
Combines two functions together in a order.
thenToFlt in interface LBiFunction<T,T,T>@Nonnull default LToDblBiFunction<T,T> thenToDbl(@Nonnull LToDblFunction<? super T> after)
Combines two functions together in a order.
thenToDbl in interface LBiFunction<T,T,T>@Nonnull default LToCharBiFunction<T,T> thenToChar(@Nonnull LToCharFunction<? super T> after)
Combines two functions together in a order.
thenToChar in interface LBiFunction<T,T,T>@Nonnull default LBiPredicate<T,T> thenToBool(@Nonnull LPredicate<? super T> after)
Combines two functions together in a order.
thenToBool in interface LBiFunction<T,T,T>@Nonnull default LBinaryOperator<T> nonNullable()
Converts to function that makes sure that the result is not null.
nonNullable in interface LBiFunction<T,T,T>static <T> T produce(T a1,
T a2)
Does nothing (LBinaryOperator) Operator
produce in interface LBiFunction<T,T,T>default <C1,C2> void forEach(IndexedRead<C1,aType.a<T>> ia1, C1 source1, IndexedRead<C2,aType.a<T>> ia2, C2 source2, LConsumer<? super T> 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.
forEach in interface LBiFunction<T,T,T>default <C1,I1,C2> void iterate(SequentialRead<C1,I1,aType.a<T>> sa1, C1 source1, IndexedRead<C2,aType.a<T>> ia2, C2 source2, LConsumer<? super T> 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.
iterate in interface LBiFunction<T,T,T>default <C1,C2,I2> void iterate(IndexedRead<C1,aType.a<T>> ia1, C1 source1, SequentialRead<C2,I2,aType.a<T>> sa2, C2 source2, LConsumer<? super T> 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.
iterate in interface LBiFunction<T,T,T>default <C1,I1,C2,I2> void iterate(SequentialRead<C1,I1,aType.a<T>> sa1, C1 source1, SequentialRead<C2,I2,aType.a<T>> sa2, C2 source2, LConsumer<? super T> 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.
iterate in interface LBiFunction<T,T,T>Copyright © 2019. All rights reserved.