@FunctionalInterface public interface LIntPredicate extends java.util.function.IntPredicate, MetaPredicate, MetaInterface.NonThrowing, Codomain<aType.aBool>, Domain1<aType.aInt>
Non-throwing functional interface (lambda) LIntPredicate for Java 8.
Type: predicate
Domain (lvl: 1): int a
Co-domain: boolean
| Modifier and Type | Interface and Description |
|---|---|
static class |
LIntPredicate.LIntPredicateSingle |
MetaInterface.NonThrowing, MetaInterface.Throwing<X>| Modifier and Type | Field and Description |
|---|---|
static String |
DESCRIPTION |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
alwaysFalse(int a)
Returns FALSE.
|
static boolean |
alwaysTrue(int a)
Returns TRUE.
|
default LIntPredicate |
and(LIntPredicate other)
Returns a predicate that represents the logical AND of evaluation of this predicate and the argument one.
|
default <V> LIntFunction<V> |
boolToIntFunc(LBoolFunction<? extends V> after)
Combines two functions together in a order.
|
default LIntPredicate |
boolToIntPred(LLogicalOperator after)
Combines two functions together in a order.
|
default LIntToByteFunction |
boolToIntToByteFunc(LBoolToByteFunction after)
Combines two functions together in a order.
|
default LIntToCharFunction |
boolToIntToCharFunc(LBoolToCharFunction after)
Combines two functions together in a order.
|
default LIntToDblFunction |
boolToIntToDblFunc(LBoolToDblFunction after)
Combines two functions together in a order.
|
default LIntToFltFunction |
boolToIntToFltFunc(LBoolToFltFunction after)
Combines two functions together in a order.
|
default LIntToLongFunction |
boolToIntToLongFunc(LBoolToLongFunction after)
Combines two functions together in a order.
|
default LIntToSrtFunction |
boolToIntToSrtFunc(LBoolToSrtFunction after)
Combines two functions together in a order.
|
default LIntUnaryOperator |
boolToIntUnaryOp(LBoolToIntFunction after)
Combines two functions together in a order.
|
static boolean |
call(int a,
LIntPredicate lambda) |
default LBoolSupplier |
capture(int a)
Captures arguments but delays the evaluation.
|
default LIntPredicate |
compose(LIntUnaryOperator before)
Allows to manipulate the domain of the function.
|
static LIntPredicate |
composed(LIntUnaryOperator before,
LIntPredicate after) |
static <V> LPredicate<V> |
composed(LToIntFunction<? super V> before,
LIntPredicate after) |
static LIntPredicate |
constant(boolean r)
Creates function that always returns the same value.
|
default boolean |
doApplyAsBoolean(int a)
For convenience, where “test()” makes things more confusing than “applyAsBoolean()”.
|
default boolean |
doIf(int a,
LAction action) |
default boolean |
doIf(int a,
LIntConsumer consumer) |
static boolean |
doIf(int a,
LIntPredicate predicate,
LAction action) |
static boolean |
doIf(int a,
LIntPredicate predicate,
LIntConsumer consumer) |
default <V> boolean |
doIf(V a1,
int a2,
int a3,
LTieIntConsumer<? super V> consumer) |
default <V> int |
doIf(V a1,
int a2,
int a3,
LTieIntFunction<? super V> consumer) |
default <V> boolean |
doIf(V a1,
int a2,
LObjIntConsumer<V> consumer) |
default <V> int |
doIf(V a1,
int a2,
LOiToIntFunction<V> consumer)
2
|
static LIntPredicate |
failSafe(LIntPredicate func,
LIntPredicate failSafe) |
default boolean |
failSafeTest(int a,
LIntPredicate failSafe) |
static boolean |
failSafeTest(int a,
LIntPredicate func,
LIntPredicate failSafe) |
default <C0> void |
filterForEach(IndexedRead<C0,aType.aInt> ia,
C0 source,
LIntConsumer consumer)
For each element (or tuple) from arguments, calls the consumer if predicate test passes.
|
default <C0,I0> void |
filterIterate(SequentialRead<C0,I0,aType.aInt> sa,
C0 source,
LIntConsumer consumer)
For each element (or tuple) from arguments, calls the consumer if predicate test passes.
|
static void |
fromTill(int min_a,
int max_a,
LIntPredicate func)
From-To.
|
static void |
fromTo(int min_a,
int max_a,
LIntPredicate func)
From-To.
|
default String |
functionalInterfaceDescription()
Returns description of the functional interface.
|
default LIntPredicate |
handling(HandlingInstructions<Throwable,RuntimeException> handling) |
default boolean |
handlingTest(int a,
HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
|
static boolean |
handlingTest(int a,
LIntPredicate func,
HandlingInstructions<Throwable,RuntimeException> handling) |
static LIntPredicate |
intPred(LIntPredicate lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
|
default <V> LPredicate<V> |
intPredCompose(LToIntFunction<? super V> before)
Allows to manipulate the domain of the function.
|
static LIntPredicate |
intPredThrowing(ExF<Throwable> exF) |
static LIntPredicate |
intPredThrowing(String message,
ExMF<Throwable> exF) |
static LIntPredicate |
isEqual(int target)
Creates predicate that evaluates if an object is equal with the argument one.
|
default LIntPredicate |
negate()
Returns a predicate that represents the logical negation of this predicate.
|
default boolean |
nestingTest(int a)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
|
default boolean |
nonNullTest(int a)
Just to mirror the method: Ensures the result is not null
|
default LIntPredicate |
or(LIntPredicate other)
Returns a predicate that represents the logical OR of evaluation of this predicate and the argument one.
|
static LIntPredicate |
recursive(LFunction<LIntPredicate,LIntPredicate> selfLambda) |
static LIntPredicate |
safe()
Safe instance.
|
static LIntPredicate |
safe(LIntPredicate other)
Safe wrapping.
|
static LSupplier<LIntPredicate> |
safeSupplier()
Safe instance supplier.
|
static LSupplier<LIntPredicate> |
safeSupplier(LSupplier<LIntPredicate> supplier)
Safe supplier.
|
default boolean |
shovingTest(int a)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
|
default boolean |
test(int a) |
default boolean |
test(int a,
ExWF<RuntimeException> exF) |
default boolean |
test(int a,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default boolean |
testThen(int a,
LPredicate<Throwable> handler) |
boolean |
testX(int a)
Implement this, but call test(int a)
|
static void |
throwIf(int a,
LIntPredicate pred,
ExMF<RuntimeException> factory,
String newMessage,
Object... messageParams) |
static void |
throwIfNot(int a,
LIntPredicate pred,
ExMF<RuntimeException> factory,
String newMessage,
Object... messageParams) |
default <V,C0> int |
tieForEach(V v,
IndexedRead<C0,aType.aInt> ia,
C0 source,
LTieIntConsumer<V> consumer)
For each element (or tuple) from arguments, calls the consumer (with index) if predicate test passes.
|
default <V,C0,I0> int |
tieIterate(V v,
SequentialRead<C0,I0,aType.aInt> sa,
C0 source,
LTieIntConsumer<V> consumer)
For each element (or tuple) from arguments, calls the consumer (with index) if predicate test passes.
|
static void |
times(int max_a,
LIntPredicate func)
From-To.
|
default LIntPredicate |
trying(ExWF<RuntimeException> exF) |
default LIntPredicate |
trying(ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default LIntPredicate |
tryingThen(LPredicate<Throwable> handler) |
static boolean |
tryTest(int a,
LIntPredicate func) |
static boolean |
tryTest(int a,
LIntPredicate func,
ExWF<RuntimeException> exF) |
static boolean |
tryTest(int a,
LIntPredicate func,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
static boolean |
tryTestThen(int a,
LIntPredicate func,
LPredicate<Throwable> handler) |
default boolean |
tupleTest(LIntSingle args) |
static LIntPredicate |
wrap(java.util.function.IntPredicate other)
Wraps JRE instance.
|
default LIntPredicate |
xor(LIntPredicate other)
Returns a predicate that represents the logical XOR of evaluation of this predicate and the argument one.
|
and, orisPredicateisFunctionformatTo, isAction, isConsumer, isOperator, isSupplierisThrowingisThrowingstatic final String DESCRIPTION
default boolean test(int a)
test in interface java.util.function.IntPredicatedefault boolean tupleTest(LIntSingle args)
default boolean handlingTest(int a,
HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
default LIntPredicate handling(HandlingInstructions<Throwable,RuntimeException> handling)
default boolean test(int a,
@Nonnull
ExWMF<RuntimeException> exF,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
default LIntPredicate trying(@Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default boolean test(int a,
@Nonnull
ExWF<RuntimeException> exF)
default LIntPredicate trying(@Nonnull ExWF<RuntimeException> exF)
default boolean testThen(int a,
@Nonnull
LPredicate<Throwable> handler)
default LIntPredicate tryingThen(@Nonnull LPredicate<Throwable> handler)
default boolean nestingTest(int a)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
default boolean shovingTest(int a)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
static boolean handlingTest(int a,
LIntPredicate func,
HandlingInstructions<Throwable,RuntimeException> handling)
static boolean tryTest(int a,
LIntPredicate func)
static boolean tryTest(int a,
LIntPredicate func,
@Nonnull
ExWMF<RuntimeException> exF,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
static boolean tryTest(int a,
LIntPredicate func,
@Nonnull
ExWF<RuntimeException> exF)
static boolean tryTestThen(int a,
LIntPredicate func,
@Nonnull
LPredicate<Throwable> handler)
default boolean failSafeTest(int a,
@Nonnull
LIntPredicate failSafe)
static boolean failSafeTest(int a,
LIntPredicate func,
@Nonnull
LIntPredicate failSafe)
static LIntPredicate failSafe(LIntPredicate func, @Nonnull LIntPredicate failSafe)
default boolean doIf(int a,
LAction action)
static boolean doIf(int a,
@Nonnull
LIntPredicate predicate,
@Nonnull
LAction action)
static boolean doIf(int a,
@Nonnull
LIntPredicate predicate,
@Nonnull
LIntConsumer consumer)
default boolean doIf(int a,
@Nonnull
LIntConsumer consumer)
static void throwIf(int a,
LIntPredicate pred,
ExMF<RuntimeException> factory,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
static void throwIfNot(int a,
LIntPredicate pred,
ExMF<RuntimeException> factory,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
default boolean nonNullTest(int a)
Just to mirror the method: Ensures the result is not null
default boolean doApplyAsBoolean(int a)
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,
LObjIntConsumer<V> consumer)
default <V> int doIf(V a1,
int a2,
LOiToIntFunction<V> consumer)
2
default <V> boolean doIf(V a1,
int a2,
int a3,
LTieIntConsumer<? super V> consumer)
default <V> int doIf(V a1,
int a2,
int a3,
LTieIntFunction<? super V> consumer)
static void fromTo(int min_a,
int max_a,
LIntPredicate func)
From-To. Intended to be used with non-capturing lambda.
static void fromTill(int min_a,
int max_a,
LIntPredicate func)
From-To. Intended to be used with non-capturing lambda.
static void times(int max_a,
LIntPredicate func)
From-To. Intended to be used with non-capturing lambda.
default LBoolSupplier capture(int a)
Captures arguments but delays the evaluation.
static LIntPredicate constant(boolean r)
Creates function that always returns the same value.
@Nonnull static LIntPredicate intPred(@Nonnull LIntPredicate lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
@Nonnull static LIntPredicate recursive(@Nonnull LFunction<LIntPredicate,LIntPredicate> selfLambda)
@Nonnull static LIntPredicate intPredThrowing(@Nonnull ExF<Throwable> exF)
@Nonnull static LIntPredicate intPredThrowing(String message, @Nonnull ExMF<Throwable> exF)
static boolean call(int a,
@Nonnull
LIntPredicate lambda)
@Nonnull static LIntPredicate wrap(java.util.function.IntPredicate other)
Wraps JRE instance.
@Nonnull static LIntPredicate safe()
Safe instance. That always returns the same value (as alwaysFalse).
@Nonnull static LSupplier<LIntPredicate> safeSupplier()
Safe instance supplier. Returns supplier of safe() instance.
@Nonnull static LIntPredicate safe(@Nullable LIntPredicate other)
Safe wrapping. Either argument function is returned (if it is not null) or safe() instance.
@Nonnull static LSupplier<LIntPredicate> safeSupplier(@Nullable LSupplier<LIntPredicate> supplier)
Safe supplier. Either argument supplier is returned (if it is not null) or supplier of safe() instance.
@Nonnull default LIntPredicate negate()
Returns a predicate that represents the logical negation of this predicate.
negate in interface java.util.function.IntPredicatejava.util.function.Predicate#negate}@Nonnull default LIntPredicate and(@Nonnull LIntPredicate 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 LIntPredicate or(@Nonnull LIntPredicate 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 LIntPredicate xor(@Nonnull LIntPredicate 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 LIntPredicate isEqual(int target)
Creates predicate that evaluates if an object is equal with the argument one.
java.util.function.Predicate#isEqual()@Nonnull default LIntPredicate compose(@Nonnull LIntUnaryOperator before)
Allows to manipulate the domain of the function.
static LIntPredicate composed(@Nonnull LIntUnaryOperator before, LIntPredicate after)
@Nonnull default <V> LPredicate<V> intPredCompose(@Nonnull LToIntFunction<? super V> before)
Allows to manipulate the domain of the function.
static <V> LPredicate<V> composed(@Nonnull LToIntFunction<? super V> before, LIntPredicate after)
@Nonnull default <V> LIntFunction<V> boolToIntFunc(@Nonnull LBoolFunction<? extends V> after)
Combines two functions together in a order.
@Nonnull default LIntToByteFunction boolToIntToByteFunc(@Nonnull LBoolToByteFunction after)
Combines two functions together in a order.
@Nonnull default LIntToSrtFunction boolToIntToSrtFunc(@Nonnull LBoolToSrtFunction after)
Combines two functions together in a order.
@Nonnull default LIntUnaryOperator boolToIntUnaryOp(@Nonnull LBoolToIntFunction after)
Combines two functions together in a order.
@Nonnull default LIntToLongFunction boolToIntToLongFunc(@Nonnull LBoolToLongFunction after)
Combines two functions together in a order.
@Nonnull default LIntToFltFunction boolToIntToFltFunc(@Nonnull LBoolToFltFunction after)
Combines two functions together in a order.
@Nonnull default LIntToDblFunction boolToIntToDblFunc(@Nonnull LBoolToDblFunction after)
Combines two functions together in a order.
@Nonnull default LIntToCharFunction boolToIntToCharFunc(@Nonnull LBoolToCharFunction after)
Combines two functions together in a order.
@Nonnull default LIntPredicate boolToIntPred(@Nonnull LLogicalOperator after)
Combines two functions together in a order.
static boolean alwaysTrue(int a)
Returns TRUE.
static boolean alwaysFalse(int a)
Returns FALSE.
default <C0> void filterForEach(IndexedRead<C0,aType.aInt> ia, C0 source, LIntConsumer 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 <C0,I0> void filterIterate(SequentialRead<C0,I0,aType.aInt> sa, C0 source, LIntConsumer 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.
default <V,C0> int tieForEach(V v,
IndexedRead<C0,aType.aInt> ia,
C0 source,
LTieIntConsumer<V> consumer)
For each element (or tuple) from arguments, calls the consumer (with index) if predicate test passes. First argument is designated as ‘target’ object. Thread safety, fail-fast, fail-safety of this method is not expected.
default <V,C0,I0> int tieIterate(V v,
SequentialRead<C0,I0,aType.aInt> sa,
C0 source,
LTieIntConsumer<V> consumer)
For each element (or tuple) from arguments, calls the consumer (with index) if predicate test passes. First argument is designated as ‘target’ object. Thread safety, fail-fast, fail-safety of this method depends highly on the arguments.
Copyright © 2019. All rights reserved.