@FunctionalInterface public interface LSrtIntPredicate extends MetaPredicate, MetaInterface.NonThrowing, Codomain<aType.aBool>, Domain2<aType.aShort,aType.aInt>
Non-throwing functional interface (lambda) LSrtIntPredicate for Java 8.
Type: predicate
Domain (lvl: 2): short a1,int a2
Co-domain: boolean
| Modifier and Type | Interface and Description |
|---|---|
static interface |
LSrtIntPredicate.LIntSrtPred
Permutation of LSrtIntPredicate for method references.
|
static class |
LSrtIntPredicate.LSrtIntPredicateSingle |
MetaInterface.NonThrowing, MetaInterface.Throwing<X>| Modifier and Type | Field and Description |
|---|---|
static String |
DESCRIPTION |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
alwaysFalse(int a2,
short a1)
Returns FALSE.
|
static boolean |
alwaysFalse(short a1,
int a2)
Returns FALSE.
|
static boolean |
alwaysTrue(int a2,
short a1)
Returns TRUE.
|
static boolean |
alwaysTrue(short a1,
int a2)
Returns TRUE.
|
default LSrtIntPredicate |
and(LSrtIntPredicate other)
Returns a predicate that represents the logical AND of evaluation of this predicate and the argument one.
|
default LSrtIntPredicate |
boolToSrtIntPred(LLogicalOperator after)
Combines two functions together in a order.
|
static boolean |
call(short a1,
int a2,
LSrtIntPredicate lambda) |
default LBoolSupplier |
capture(short a1,
int a2)
Captures arguments but delays the evaluation.
|
default LSrtIntPredicate |
compose(LSrtUnaryOperator before1,
LIntUnaryOperator before2)
Allows to manipulate the domain of the function.
|
static LSrtIntPredicate |
composed(LSrtUnaryOperator before1,
LIntUnaryOperator before2,
LSrtIntPredicate after) |
static <V1,V2> LBiPredicate<V1,V2> |
composed(LToSrtFunction<? super V1> before1,
LToIntFunction<? super V2> before2,
LSrtIntPredicate after) |
static LSrtIntPredicate |
constant(boolean r)
Creates function that always returns the same value.
|
default boolean |
doApplyAsBoolean(short a1,
int a2)
For convenience, where “test()” makes things more confusing than “applyAsBoolean()”.
|
default boolean |
doIf(short a1,
int a2,
LAction action) |
default boolean |
doIf(short a1,
int a2,
LSrtIntConsumer consumer) |
static boolean |
doIf(short a1,
int a2,
LSrtIntPredicate predicate,
LAction action) |
static boolean |
doIf(short a1,
int a2,
LSrtIntPredicate predicate,
LSrtIntConsumer consumer) |
default <V> boolean |
doIf(V a1,
int a2,
short a3,
LTieSrtConsumer<? super V> consumer) |
default <V> int |
doIf(V a1,
int a2,
short a3,
LTieSrtFunction<? super V> consumer) |
static LSrtIntPredicate |
failSafe(LSrtIntPredicate func,
LSrtIntPredicate failSafe) |
default boolean |
failSafeTest(short a1,
int a2,
LSrtIntPredicate failSafe) |
static boolean |
failSafeTest(short a1,
int a2,
LSrtIntPredicate func,
LSrtIntPredicate failSafe) |
default <C1,C2> void |
filterForEach(IndexedRead<C1,aType.aShort> ia1,
C1 source1,
IndexedRead<C2,aType.aInt> ia2,
C2 source2,
LSrtIntConsumer consumer)
For each element (or tuple) from arguments, calls the consumer if predicate test passes.
|
default <C1,C2,I2> void |
filterIterate(IndexedRead<C1,aType.aShort> ia1,
C1 source1,
SequentialRead<C2,I2,aType.aInt> sa2,
C2 source2,
LSrtIntConsumer consumer)
For each element (or tuple) from arguments, calls the consumer if predicate test passes.
|
default <C1,I1,C2> void |
filterIterate(SequentialRead<C1,I1,aType.aShort> sa1,
C1 source1,
IndexedRead<C2,aType.aInt> ia2,
C2 source2,
LSrtIntConsumer consumer)
For each element (or tuple) from arguments, calls the consumer if predicate test passes.
|
default <C1,I1,C2,I2> |
filterIterate(SequentialRead<C1,I1,aType.aShort> sa1,
C1 source1,
SequentialRead<C2,I2,aType.aInt> sa2,
C2 source2,
LSrtIntConsumer consumer)
For each element (or tuple) from arguments, calls the consumer if predicate test passes.
|
static void |
fromTill(int min_a2,
int max_a2,
short a1,
LSrtIntPredicate func)
From-To.
|
static void |
fromTo(int min_a2,
int max_a2,
short a1,
LSrtIntPredicate func)
From-To.
|
default String |
functionalInterfaceDescription()
Returns description of the functional interface.
|
default LSrtIntPredicate |
handling(HandlingInstructions<Throwable,RuntimeException> handling) |
default boolean |
handlingTest(short a1,
int a2,
HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
|
static boolean |
handlingTest(short a1,
int a2,
LSrtIntPredicate func,
HandlingInstructions<Throwable,RuntimeException> handling) |
static LSrtIntPredicate.LIntSrtPred |
intSrtPred(LSrtIntPredicate.LIntSrtPred lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
|
static LSrtIntPredicate |
isEqual(short v1,
int v2)
Creates predicate that evaluates if an object is equal with the argument one.
|
default LIntPredicate |
lShrink(LIntToSrtFunction left) |
default LIntPredicate |
lShrinkc(short a1) |
static LIntPredicate |
lShrinked(LIntToSrtFunction left,
LSrtIntPredicate func) |
static LIntPredicate |
lShrinkedc(short a1,
LSrtIntPredicate func) |
default LSrtIntPredicate |
negate()
Returns a predicate that represents the logical negation of this predicate.
|
default boolean |
nestingTest(short a1,
int a2)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
|
default boolean |
nonNullTest(short a1,
int a2)
Just to mirror the method: Ensures the result is not null
|
default LSrtIntPredicate |
or(LSrtIntPredicate other)
Returns a predicate that represents the logical OR of evaluation of this predicate and the argument one.
|
static LSrtIntPredicate |
recursive(LFunction<LSrtIntPredicate,LSrtIntPredicate> selfLambda) |
default LSrtPredicate |
rShrink(LSrtToIntFunction right) |
default LSrtPredicate |
rShrinkc(int a2) |
static LSrtPredicate |
rShrinked(LSrtToIntFunction right,
LSrtIntPredicate func) |
static LSrtPredicate |
rShrinkedc(int a2,
LSrtIntPredicate func) |
static LSrtIntPredicate |
safe()
Safe instance.
|
static LSrtIntPredicate |
safe(LSrtIntPredicate other)
Safe wrapping.
|
static LSupplier<LSrtIntPredicate> |
safeSupplier()
Safe instance supplier.
|
static LSupplier<LSrtIntPredicate> |
safeSupplier(LSupplier<LSrtIntPredicate> supplier)
Safe supplier.
|
default boolean |
shovingTest(short a1,
int a2)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
|
static LSrtIntPredicate |
srtIntPred(LSrtIntPredicate 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> |
srtIntPredCompose(LToSrtFunction<? super V1> before1,
LToIntFunction<? super V2> before2)
Allows to manipulate the domain of the function.
|
static LSrtIntPredicate |
srtIntPredThrowing(ExF<Throwable> exF) |
static LSrtIntPredicate |
srtIntPredThrowing(String message,
ExMF<Throwable> exF) |
default boolean |
test(short a1,
int a2) |
default boolean |
test(short a1,
int a2,
ExWF<RuntimeException> exF) |
default boolean |
test(short a1,
int a2,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
static LSrtIntPredicate |
test1st(LSrtPredicate func)
Captures single parameter function into this interface where only 1st parameter will be used.
|
static LSrtIntPredicate |
test2nd(LIntPredicate func)
Captures single parameter function into this interface where only 2nd parameter will be used.
|
default boolean |
testThen(short a1,
int a2,
LPredicate<Throwable> handler) |
boolean |
testX(short a1,
int a2)
Implement this, but call test(short a1,int a2)
|
static void |
throwIf(short a1,
int a2,
LSrtIntPredicate pred,
ExMF<RuntimeException> factory,
String newMessage,
Object... messageParams) |
static void |
throwIfNot(short a1,
int a2,
LSrtIntPredicate pred,
ExMF<RuntimeException> factory,
String newMessage,
Object... messageParams) |
static void |
times(int max_a2,
short a1,
LSrtIntPredicate func)
From-To.
|
default LSrtIntPredicate |
trying(ExWF<RuntimeException> exF) |
default LSrtIntPredicate |
trying(ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default LSrtIntPredicate |
tryingThen(LPredicate<Throwable> handler) |
static boolean |
tryTest(short a1,
int a2,
LSrtIntPredicate func) |
static boolean |
tryTest(short a1,
int a2,
LSrtIntPredicate func,
ExWF<RuntimeException> exF) |
static boolean |
tryTest(short a1,
int a2,
LSrtIntPredicate func,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
static boolean |
tryTestThen(short a1,
int a2,
LSrtIntPredicate func,
LPredicate<Throwable> handler) |
default boolean |
tupleTest(LSrtIntPair args) |
static LSrtIntPredicate |
uncurry(LSrtFunction<LIntPredicate> func) |
default LSrtIntPredicate |
xor(LSrtIntPredicate other)
Returns a predicate that represents the logical XOR of evaluation of this predicate and the argument one.
|
isPredicateisFunctionformatTo, isAction, isConsumer, isOperator, isSupplierisThrowingisThrowingstatic final String DESCRIPTION
default boolean test(short a1,
int a2)
boolean testX(short a1,
int a2)
throws Throwable
Implement this, but call test(short a1,int a2)
Throwabledefault boolean tupleTest(LSrtIntPair args)
default boolean handlingTest(short a1,
int a2,
HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
default LSrtIntPredicate handling(HandlingInstructions<Throwable,RuntimeException> handling)
default boolean test(short a1,
int a2,
@Nonnull
ExWMF<RuntimeException> exF,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
default LSrtIntPredicate trying(@Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default boolean test(short a1,
int a2,
@Nonnull
ExWF<RuntimeException> exF)
default LSrtIntPredicate trying(@Nonnull ExWF<RuntimeException> exF)
default boolean testThen(short a1,
int a2,
@Nonnull
LPredicate<Throwable> handler)
default LSrtIntPredicate tryingThen(@Nonnull LPredicate<Throwable> handler)
default boolean nestingTest(short a1,
int a2)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
default boolean shovingTest(short a1,
int a2)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
static boolean handlingTest(short a1,
int a2,
LSrtIntPredicate func,
HandlingInstructions<Throwable,RuntimeException> handling)
static boolean tryTest(short a1,
int a2,
LSrtIntPredicate func)
static boolean tryTest(short a1,
int a2,
LSrtIntPredicate func,
@Nonnull
ExWMF<RuntimeException> exF,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
static boolean tryTest(short a1,
int a2,
LSrtIntPredicate func,
@Nonnull
ExWF<RuntimeException> exF)
static boolean tryTestThen(short a1,
int a2,
LSrtIntPredicate func,
@Nonnull
LPredicate<Throwable> handler)
default boolean failSafeTest(short a1,
int a2,
@Nonnull
LSrtIntPredicate failSafe)
static boolean failSafeTest(short a1,
int a2,
LSrtIntPredicate func,
@Nonnull
LSrtIntPredicate failSafe)
static LSrtIntPredicate failSafe(LSrtIntPredicate func, @Nonnull LSrtIntPredicate failSafe)
default boolean doIf(short a1,
int a2,
LAction action)
static boolean doIf(short a1,
int a2,
@Nonnull
LSrtIntPredicate predicate,
@Nonnull
LAction action)
static boolean doIf(short a1,
int a2,
@Nonnull
LSrtIntPredicate predicate,
@Nonnull
LSrtIntConsumer consumer)
default boolean doIf(short a1,
int a2,
@Nonnull
LSrtIntConsumer consumer)
static void throwIf(short a1,
int a2,
LSrtIntPredicate pred,
ExMF<RuntimeException> factory,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
static void throwIfNot(short a1,
int a2,
LSrtIntPredicate pred,
ExMF<RuntimeException> factory,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
default boolean nonNullTest(short a1,
int a2)
Just to mirror the method: Ensures the result is not null
default boolean doApplyAsBoolean(short a1,
int a2)
For convenience, where “test()” makes things more confusing than “applyAsBoolean()”.
@Nonnull default String functionalInterfaceDescription()
Returns description of the functional interface.
functionalInterfaceDescription in interface MetaFunctionalInterfacedefault <V> boolean doIf(V a1,
int a2,
short a3,
LTieSrtConsumer<? super V> consumer)
default <V> int doIf(V a1,
int a2,
short a3,
LTieSrtFunction<? super V> consumer)
static void fromTo(int min_a2,
int max_a2,
short a1,
LSrtIntPredicate func)
From-To. Intended to be used with non-capturing lambda.
static void fromTill(int min_a2,
int max_a2,
short a1,
LSrtIntPredicate func)
From-To. Intended to be used with non-capturing lambda.
static void times(int max_a2,
short a1,
LSrtIntPredicate func)
From-To. Intended to be used with non-capturing lambda.
default LIntPredicate lShrink(LIntToSrtFunction left)
default LIntPredicate lShrinkc(short a1)
static LIntPredicate lShrinked(LIntToSrtFunction left, LSrtIntPredicate func)
static LIntPredicate lShrinkedc(short a1, LSrtIntPredicate func)
default LSrtPredicate rShrink(LSrtToIntFunction right)
default LSrtPredicate rShrinkc(int a2)
static LSrtPredicate rShrinked(LSrtToIntFunction right, LSrtIntPredicate func)
static LSrtPredicate rShrinkedc(int a2, LSrtIntPredicate func)
static LSrtIntPredicate uncurry(LSrtFunction<LIntPredicate> func)
default LBoolSupplier capture(short a1, int a2)
Captures arguments but delays the evaluation.
static LSrtIntPredicate constant(boolean r)
Creates function that always returns the same value.
@Nonnull static LSrtIntPredicate test1st(@Nonnull LSrtPredicate func)
Captures single parameter function into this interface where only 1st parameter will be used.
@Nonnull static LSrtIntPredicate test2nd(@Nonnull LIntPredicate func)
Captures single parameter function into this interface where only 2nd parameter will be used.
@Nonnull static LSrtIntPredicate srtIntPred(@Nonnull LSrtIntPredicate lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
@Nonnull static LSrtIntPredicate recursive(@Nonnull LFunction<LSrtIntPredicate,LSrtIntPredicate> selfLambda)
@Nonnull static LSrtIntPredicate srtIntPredThrowing(@Nonnull ExF<Throwable> exF)
@Nonnull static LSrtIntPredicate srtIntPredThrowing(String message, @Nonnull ExMF<Throwable> exF)
@Nonnull static LSrtIntPredicate.LIntSrtPred intSrtPred(@Nonnull LSrtIntPredicate.LIntSrtPred lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
static boolean call(short a1,
int a2,
@Nonnull
LSrtIntPredicate lambda)
@Nonnull static LSrtIntPredicate safe()
Safe instance. That always returns the same value (as alwaysFalse).
@Nonnull static LSupplier<LSrtIntPredicate> safeSupplier()
Safe instance supplier. Returns supplier of safe() instance.
@Nonnull static LSrtIntPredicate safe(@Nullable LSrtIntPredicate other)
Safe wrapping. Either argument function is returned (if it is not null) or safe() instance.
@Nonnull static LSupplier<LSrtIntPredicate> safeSupplier(@Nullable LSupplier<LSrtIntPredicate> supplier)
Safe supplier. Either argument supplier is returned (if it is not null) or supplier of safe() instance.
@Nonnull default LSrtIntPredicate negate()
Returns a predicate that represents the logical negation of this predicate.
java.util.function.Predicate#negate}@Nonnull default LSrtIntPredicate and(@Nonnull LSrtIntPredicate 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 LSrtIntPredicate or(@Nonnull LSrtIntPredicate 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 LSrtIntPredicate xor(@Nonnull LSrtIntPredicate 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 LSrtIntPredicate isEqual(short v1, int v2)
Creates predicate that evaluates if an object is equal with the argument one.
java.util.function.Predicate#isEqual()@Nonnull default LSrtIntPredicate compose(@Nonnull LSrtUnaryOperator before1, @Nonnull LIntUnaryOperator before2)
Allows to manipulate the domain of the function.
static LSrtIntPredicate composed(@Nonnull LSrtUnaryOperator before1, @Nonnull LIntUnaryOperator before2, LSrtIntPredicate after)
@Nonnull default <V1,V2> LBiPredicate<V1,V2> srtIntPredCompose(@Nonnull LToSrtFunction<? super V1> before1, @Nonnull LToIntFunction<? super V2> before2)
Allows to manipulate the domain of the function.
static <V1,V2> LBiPredicate<V1,V2> composed(@Nonnull LToSrtFunction<? super V1> before1, @Nonnull LToIntFunction<? super V2> before2, LSrtIntPredicate after)
@Nonnull default LSrtIntPredicate boolToSrtIntPred(@Nonnull LLogicalOperator after)
Combines two functions together in a order.
static boolean alwaysTrue(short a1,
int a2)
Returns TRUE.
static boolean alwaysFalse(short a1,
int a2)
Returns FALSE.
static boolean alwaysTrue(int a2,
short a1)
Returns TRUE.
static boolean alwaysFalse(int a2,
short a1)
Returns FALSE.
default <C1,C2> void filterForEach(IndexedRead<C1,aType.aShort> ia1, C1 source1, IndexedRead<C2,aType.aInt> ia2, C2 source2, LSrtIntConsumer consumer)
For each element (or tuple) from arguments, calls the consumer if predicate test passes. Thread safety, fail-fast, fail-safety of this method is not expected.
default <C1,I1,C2> void filterIterate(SequentialRead<C1,I1,aType.aShort> sa1, C1 source1, IndexedRead<C2,aType.aInt> ia2, C2 source2, LSrtIntConsumer consumer)
For each element (or tuple) from arguments, calls the consumer if predicate test passes. Thread safety, fail-fast, fail-safety of this method is not expected.
default <C1,C2,I2> void filterIterate(IndexedRead<C1,aType.aShort> ia1, C1 source1, SequentialRead<C2,I2,aType.aInt> sa2, C2 source2, LSrtIntConsumer consumer)
For each element (or tuple) from arguments, calls the consumer if predicate test passes. Thread safety, fail-fast, fail-safety of this method is not expected.
default <C1,I1,C2,I2> void filterIterate(SequentialRead<C1,I1,aType.aShort> sa1, C1 source1, SequentialRead<C2,I2,aType.aInt> sa2, C2 source2, LSrtIntConsumer consumer)
For each element (or tuple) from arguments, calls the consumer if predicate test passes. Thread safety, fail-fast, fail-safety of this method depends highly on the arguments.
Copyright © 2019. All rights reserved.