@FunctionalInterface public interface LLogicalBinaryOperator extends MetaInterface.NonThrowing, MetaLogicalOperator, Codomain<aType.aBool>, Domain2<aType.aBool,aType.aBool>
Non-throwing functional interface (lambda) LLogicalBinaryOperator for Java 8.
Type: operator
Domain (lvl: 2): boolean a1,boolean a2
Co-domain: boolean
| Modifier and Type | Interface and Description |
|---|---|
static class |
LLogicalBinaryOperator.LLogicalBinaryOperatorSingle |
MetaInterface.NonThrowing, MetaInterface.Throwing<X>| Modifier and Type | Field and Description |
|---|---|
static String |
DESCRIPTION |
| Modifier and Type | Method and Description |
|---|---|
static LLogicalBinaryOperator |
and()
Returns function that applies logical AND operator.
|
default LLogicalBinaryOperator |
and(LLogicalBinaryOperator other)
Returns a predicate that represents the logical AND of evaluation of this predicate and the argument one.
|
default boolean |
apply(boolean a1,
boolean a2) |
default boolean |
apply(boolean a1,
boolean a2,
ExWF<RuntimeException> exF) |
default boolean |
apply(boolean a1,
boolean a2,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
static LLogicalBinaryOperator |
apply1st(LLogicalOperator func)
Captures single parameter function into this interface where only 1st parameter will be used.
|
static LLogicalBinaryOperator |
apply2nd(LLogicalOperator func)
Captures single parameter function into this interface where only 2nd parameter will be used.
|
default boolean |
applyThen(boolean a1,
boolean a2,
LPredicate<Throwable> handler) |
boolean |
applyX(boolean a1,
boolean a2)
Implement this, but call apply(boolean a1,boolean a2)
|
static boolean |
call(boolean a1,
boolean a2,
LLogicalBinaryOperator lambda) |
default LBoolSupplier |
capture(boolean a1,
boolean a2)
Captures arguments but delays the evaluation.
|
default LLogicalBinaryOperator |
compose(LLogicalOperator before1,
LLogicalOperator before2)
Allows to manipulate the domain of the function.
|
static LLogicalBinaryOperator |
composed(LLogicalOperator before1,
LLogicalOperator before2,
LLogicalBinaryOperator after) |
static <V1,V2> LBiPredicate<V1,V2> |
composed(LPredicate<? super V1> before1,
LPredicate<? super V2> before2,
LLogicalBinaryOperator after) |
static LLogicalBinaryOperator |
constant(boolean r)
Creates function that always returns the same value.
|
default boolean |
doIf(boolean a1,
boolean a2,
LAction action) |
default boolean |
doIf(boolean a1,
boolean a2,
LBiBoolConsumer consumer) |
static boolean |
doIf(boolean a1,
boolean a2,
LLogicalBinaryOperator predicate,
LAction action) |
static boolean |
doIf(boolean a1,
boolean a2,
LLogicalBinaryOperator predicate,
LBiBoolConsumer consumer) |
default boolean |
doTest(boolean a1,
boolean a2)
For convenience, boolean operator is also special case of predicate.
|
static LLogicalBinaryOperator |
failSafe(LLogicalBinaryOperator func,
LLogicalBinaryOperator failSafe) |
default boolean |
failSafeApply(boolean a1,
boolean a2,
LLogicalBinaryOperator failSafe) |
static boolean |
failSafeApply(boolean a1,
boolean a2,
LLogicalBinaryOperator func,
LLogicalBinaryOperator failSafe) |
default <C1,C2> void |
forEach(IndexedRead<C1,aType.aBool> ia1,
C1 source1,
IndexedRead<C2,aType.aBool> ia2,
C2 source2,
LBoolConsumer 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,
boolean a1,
boolean a2,
LLogicalBinaryOperator func)
From-To.
|
static void |
fromTo(int min_i,
int max_i,
boolean a1,
boolean a2,
LLogicalBinaryOperator func)
From-To.
|
default String |
functionalInterfaceDescription()
Returns description of the functional interface.
|
default LLogicalBinaryOperator |
handling(HandlingInstructions<Throwable,RuntimeException> handling) |
default boolean |
handlingApply(boolean a1,
boolean a2,
HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
|
static boolean |
handlingApply(boolean a1,
boolean a2,
LLogicalBinaryOperator func,
HandlingInstructions<Throwable,RuntimeException> handling) |
static LLogicalBinaryOperator |
isEqual(boolean v1,
boolean v2)
Creates predicate that evaluates if an object is equal with the argument one.
|
default <C1,C2,I2> void |
iterate(IndexedRead<C1,aType.aBool> ia1,
C1 source1,
SequentialRead<C2,I2,aType.aBool> sa2,
C2 source2,
LBoolConsumer 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.aBool> sa1,
C1 source1,
IndexedRead<C2,aType.aBool> ia2,
C2 source2,
LBoolConsumer 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.aBool> sa1,
C1 source1,
SequentialRead<C2,I2,aType.aBool> sa2,
C2 source2,
LBoolConsumer consumer)
For each element (or tuple) from arguments, calls the function and passes the result to consumer.
|
static LLogicalBinaryOperator |
logicalBinaryOp(LLogicalBinaryOperator lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
|
default <V1,V2> LBiPredicate<V1,V2> |
logicalBinaryOpCompose(LPredicate<? super V1> before1,
LPredicate<? super V2> before2)
Allows to manipulate the domain of the function.
|
static LLogicalBinaryOperator |
logicalBinaryOpThrowing(ExF<Throwable> exF) |
static LLogicalBinaryOperator |
logicalBinaryOpThrowing(String message,
ExMF<Throwable> exF) |
default LLogicalOperator |
lShrink(LLogicalOperator left) |
default LLogicalOperator |
lShrinkc(boolean a1) |
static LLogicalOperator |
lShrinked(LLogicalOperator left,
LLogicalBinaryOperator func) |
static LLogicalOperator |
lShrinkedc(boolean a1,
LLogicalBinaryOperator func) |
default LLogicalBinaryOperator |
negate()
Returns a predicate that represents the logical negation of this predicate.
|
default boolean |
nestingApply(boolean a1,
boolean a2)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
|
default boolean |
nonNullApply(boolean a1,
boolean a2)
Just to mirror the method: Ensures the result is not null
|
static LLogicalBinaryOperator |
or()
Returns function that applies logical OR operator.
|
default LLogicalBinaryOperator |
or(LLogicalBinaryOperator other)
Returns a predicate that represents the logical OR of evaluation of this predicate and the argument one.
|
static boolean |
produceBoolean(boolean a1,
boolean a2)
Does nothing (LLogicalBinaryOperator) Operator
|
static LLogicalBinaryOperator |
recursive(LFunction<LLogicalBinaryOperator,LLogicalBinaryOperator> selfLambda) |
default LLogicalOperator |
rShrink(LLogicalOperator right) |
default LLogicalOperator |
rShrinkc(boolean a2) |
static LLogicalOperator |
rShrinked(LLogicalOperator right,
LLogicalBinaryOperator func) |
static LLogicalOperator |
rShrinkedc(boolean a2,
LLogicalBinaryOperator func) |
static LLogicalBinaryOperator |
safe()
Safe instance.
|
static LLogicalBinaryOperator |
safe(LLogicalBinaryOperator other)
Safe wrapping.
|
static LSupplier<LLogicalBinaryOperator> |
safeSupplier()
Safe instance supplier.
|
static LSupplier<LLogicalBinaryOperator> |
safeSupplier(LSupplier<LLogicalBinaryOperator> supplier)
Safe supplier.
|
default boolean |
shovingApply(boolean a1,
boolean a2)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
|
default <V> LBiBoolFunction<V> |
then(LBoolFunction<? extends V> after)
Combines two functions together in a order.
|
default LLogicalBinaryOperator |
thenToBool(LLogicalOperator after)
Combines two functions together in a order.
|
static void |
throwIf(boolean a1,
boolean a2,
LLogicalBinaryOperator pred,
ExMF<RuntimeException> factory,
String newMessage,
Object... messageParams) |
static void |
throwIfNot(boolean a1,
boolean a2,
LLogicalBinaryOperator pred,
ExMF<RuntimeException> factory,
String newMessage,
Object... messageParams) |
static void |
times(int max_i,
boolean a1,
boolean a2,
LLogicalBinaryOperator func)
From-To.
|
static boolean |
tryApply(boolean a1,
boolean a2,
LLogicalBinaryOperator func) |
static boolean |
tryApply(boolean a1,
boolean a2,
LLogicalBinaryOperator func,
ExWF<RuntimeException> exF) |
static boolean |
tryApply(boolean a1,
boolean a2,
LLogicalBinaryOperator func,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
static boolean |
tryApplyThen(boolean a1,
boolean a2,
LLogicalBinaryOperator func,
LPredicate<Throwable> handler) |
default LLogicalBinaryOperator |
trying(ExWF<RuntimeException> exF) |
default LLogicalBinaryOperator |
trying(ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default LLogicalBinaryOperator |
tryingThen(LPredicate<Throwable> handler) |
default boolean |
tupleApply(LBoolPair args) |
static LLogicalBinaryOperator |
uncurry(LBoolFunction<LLogicalOperator> func) |
static LLogicalBinaryOperator |
xor()
Returns function that applies logical XOR operator.
|
default LLogicalBinaryOperator |
xor(LLogicalBinaryOperator other)
Returns a predicate that represents the logical XOR of evaluation of this predicate and the argument one.
|
isThrowingisOperatorisPredicateisFunctionformatTo, isAction, isConsumer, isSupplierstatic final String DESCRIPTION
default boolean apply(boolean a1,
boolean a2)
boolean applyX(boolean a1,
boolean a2)
throws Throwable
Implement this, but call apply(boolean a1,boolean a2)
Throwabledefault boolean tupleApply(LBoolPair args)
default boolean handlingApply(boolean a1,
boolean a2,
HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
default LLogicalBinaryOperator handling(HandlingInstructions<Throwable,RuntimeException> handling)
default boolean apply(boolean a1,
boolean a2,
@Nonnull
ExWMF<RuntimeException> exF,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
default LLogicalBinaryOperator trying(@Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default boolean apply(boolean a1,
boolean a2,
@Nonnull
ExWF<RuntimeException> exF)
default LLogicalBinaryOperator trying(@Nonnull ExWF<RuntimeException> exF)
default boolean applyThen(boolean a1,
boolean a2,
@Nonnull
LPredicate<Throwable> handler)
default LLogicalBinaryOperator tryingThen(@Nonnull LPredicate<Throwable> handler)
default boolean nestingApply(boolean a1,
boolean a2)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
default boolean shovingApply(boolean a1,
boolean a2)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
static boolean handlingApply(boolean a1,
boolean a2,
LLogicalBinaryOperator func,
HandlingInstructions<Throwable,RuntimeException> handling)
static boolean tryApply(boolean a1,
boolean a2,
LLogicalBinaryOperator func)
static boolean tryApply(boolean a1,
boolean a2,
LLogicalBinaryOperator func,
@Nonnull
ExWMF<RuntimeException> exF,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
static boolean tryApply(boolean a1,
boolean a2,
LLogicalBinaryOperator func,
@Nonnull
ExWF<RuntimeException> exF)
static boolean tryApplyThen(boolean a1,
boolean a2,
LLogicalBinaryOperator func,
@Nonnull
LPredicate<Throwable> handler)
default boolean failSafeApply(boolean a1,
boolean a2,
@Nonnull
LLogicalBinaryOperator failSafe)
static boolean failSafeApply(boolean a1,
boolean a2,
LLogicalBinaryOperator func,
@Nonnull
LLogicalBinaryOperator failSafe)
static LLogicalBinaryOperator failSafe(LLogicalBinaryOperator func, @Nonnull LLogicalBinaryOperator failSafe)
default boolean doIf(boolean a1,
boolean a2,
LAction action)
static boolean doIf(boolean a1,
boolean a2,
@Nonnull
LLogicalBinaryOperator predicate,
@Nonnull
LAction action)
static boolean doIf(boolean a1,
boolean a2,
@Nonnull
LLogicalBinaryOperator predicate,
@Nonnull
LBiBoolConsumer consumer)
default boolean doIf(boolean a1,
boolean a2,
@Nonnull
LBiBoolConsumer consumer)
static void throwIf(boolean a1,
boolean a2,
LLogicalBinaryOperator pred,
ExMF<RuntimeException> factory,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
static void throwIfNot(boolean a1,
boolean a2,
LLogicalBinaryOperator pred,
ExMF<RuntimeException> factory,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
default boolean nonNullApply(boolean a1,
boolean a2)
Just to mirror the method: Ensures the result is not null
default boolean doTest(boolean a1,
boolean a2)
For convenience, boolean operator is also special case of predicate.
@Nonnull default String functionalInterfaceDescription()
Returns description of the functional interface.
functionalInterfaceDescription in interface MetaFunctionalInterfacestatic void fromTo(int min_i,
int max_i,
boolean a1,
boolean a2,
LLogicalBinaryOperator func)
From-To. Intended to be used with non-capturing lambda.
static void fromTill(int min_i,
int max_i,
boolean a1,
boolean a2,
LLogicalBinaryOperator func)
From-To. Intended to be used with non-capturing lambda.
static void times(int max_i,
boolean a1,
boolean a2,
LLogicalBinaryOperator func)
From-To. Intended to be used with non-capturing lambda.
default LLogicalOperator lShrink(LLogicalOperator left)
default LLogicalOperator lShrinkc(boolean a1)
static LLogicalOperator lShrinked(LLogicalOperator left, LLogicalBinaryOperator func)
static LLogicalOperator lShrinkedc(boolean a1, LLogicalBinaryOperator func)
default LLogicalOperator rShrink(LLogicalOperator right)
default LLogicalOperator rShrinkc(boolean a2)
static LLogicalOperator rShrinked(LLogicalOperator right, LLogicalBinaryOperator func)
static LLogicalOperator rShrinkedc(boolean a2, LLogicalBinaryOperator func)
static LLogicalBinaryOperator uncurry(LBoolFunction<LLogicalOperator> func)
default LBoolSupplier capture(boolean a1, boolean a2)
Captures arguments but delays the evaluation.
static LLogicalBinaryOperator constant(boolean r)
Creates function that always returns the same value.
@Nonnull static LLogicalBinaryOperator apply1st(@Nonnull LLogicalOperator func)
Captures single parameter function into this interface where only 1st parameter will be used.
@Nonnull static LLogicalBinaryOperator apply2nd(@Nonnull LLogicalOperator func)
Captures single parameter function into this interface where only 2nd parameter will be used.
@Nonnull static LLogicalBinaryOperator logicalBinaryOp(@Nonnull LLogicalBinaryOperator lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
@Nonnull static LLogicalBinaryOperator recursive(@Nonnull LFunction<LLogicalBinaryOperator,LLogicalBinaryOperator> selfLambda)
@Nonnull static LLogicalBinaryOperator logicalBinaryOpThrowing(@Nonnull ExF<Throwable> exF)
@Nonnull static LLogicalBinaryOperator logicalBinaryOpThrowing(String message, @Nonnull ExMF<Throwable> exF)
static boolean call(boolean a1,
boolean a2,
@Nonnull
LLogicalBinaryOperator lambda)
@Nonnull static LLogicalBinaryOperator safe()
Safe instance. That always returns the same value (as produceBoolean).
@Nonnull static LSupplier<LLogicalBinaryOperator> safeSupplier()
Safe instance supplier. Returns supplier of safe() instance.
@Nonnull static LLogicalBinaryOperator safe(@Nullable LLogicalBinaryOperator other)
Safe wrapping. Either argument function is returned (if it is not null) or safe() instance.
@Nonnull static LSupplier<LLogicalBinaryOperator> safeSupplier(@Nullable LSupplier<LLogicalBinaryOperator> supplier)
Safe supplier. Either argument supplier is returned (if it is not null) or supplier of safe() instance.
@Nonnull default LLogicalBinaryOperator negate()
Returns a predicate that represents the logical negation of this predicate.
java.util.function.Predicate#negate}@Nonnull default LLogicalBinaryOperator and(@Nonnull LLogicalBinaryOperator other)
Returns a predicate that represents the logical AND of evaluation of this predicate and the argument one.
java.util.function.Predicate#and()}@Nonnull default LLogicalBinaryOperator or(@Nonnull LLogicalBinaryOperator other)
Returns a predicate that represents the logical OR of evaluation of this predicate and the argument one.
java.util.function.Predicate#or}@Nonnull default LLogicalBinaryOperator xor(@Nonnull LLogicalBinaryOperator other)
Returns a predicate that represents the logical XOR of evaluation of this predicate and the argument one.
java.util.function.Predicate#or}@Nonnull static LLogicalBinaryOperator isEqual(boolean v1, boolean v2)
Creates predicate that evaluates if an object is equal with the argument one.
java.util.function.Predicate#isEqual()@Nonnull static LLogicalBinaryOperator and()
Returns function that applies logical AND operator.
@Nonnull static LLogicalBinaryOperator or()
Returns function that applies logical OR operator.
@Nonnull static LLogicalBinaryOperator xor()
Returns function that applies logical XOR operator.
@Nonnull default LLogicalBinaryOperator compose(@Nonnull LLogicalOperator before1, @Nonnull LLogicalOperator before2)
Allows to manipulate the domain of the function.
static LLogicalBinaryOperator composed(@Nonnull LLogicalOperator before1, @Nonnull LLogicalOperator before2, LLogicalBinaryOperator after)
@Nonnull default <V1,V2> LBiPredicate<V1,V2> logicalBinaryOpCompose(@Nonnull LPredicate<? super V1> before1, @Nonnull LPredicate<? super V2> before2)
Allows to manipulate the domain of the function.
static <V1,V2> LBiPredicate<V1,V2> composed(@Nonnull LPredicate<? super V1> before1, @Nonnull LPredicate<? super V2> before2, LLogicalBinaryOperator after)
@Nonnull default <V> LBiBoolFunction<V> then(@Nonnull LBoolFunction<? extends V> after)
Combines two functions together in a order.
@Nonnull default LLogicalBinaryOperator thenToBool(@Nonnull LLogicalOperator after)
Combines two functions together in a order.
static boolean produceBoolean(boolean a1,
boolean a2)
Does nothing (LLogicalBinaryOperator) Operator
default <C1,C2> void forEach(IndexedRead<C1,aType.aBool> ia1, C1 source1, IndexedRead<C2,aType.aBool> ia2, C2 source2, LBoolConsumer 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.aBool> sa1, C1 source1, IndexedRead<C2,aType.aBool> ia2, C2 source2, LBoolConsumer 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.aBool> ia1, C1 source1, SequentialRead<C2,I2,aType.aBool> sa2, C2 source2, LBoolConsumer 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.aBool> sa1, C1 source1, SequentialRead<C2,I2,aType.aBool> sa2, C2 source2, LBoolConsumer 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.