@FunctionalInterface public interface LLongPredicate extends java.util.function.LongPredicate, MetaPredicate, MetaInterface.NonThrowing, Codomain<aType.aBool>, Domain1<aType.aLong>
Non-throwing functional interface (lambda) LLongPredicate for Java 8.
Type: predicate
Domain (lvl: 1): long a
Co-domain: boolean
| Modifier and Type | Interface and Description |
|---|---|
static class |
LLongPredicate.LLongPredicateSingle |
MetaInterface.NonThrowing, MetaInterface.Throwing<X>| Modifier and Type | Field and Description |
|---|---|
static String |
DESCRIPTION |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
alwaysFalse(long a)
Returns FALSE.
|
static boolean |
alwaysTrue(long a)
Returns TRUE.
|
default LLongPredicate |
and(LLongPredicate other)
Returns a predicate that represents the logical AND of evaluation of this predicate and the argument one.
|
default <V> LLongFunction<V> |
boolToLongFunc(LBoolFunction<? extends V> after)
Combines two functions together in a order.
|
default LLongPredicate |
boolToLongPred(LLogicalOperator after)
Combines two functions together in a order.
|
default LLongToByteFunction |
boolToLongToByteFunc(LBoolToByteFunction after)
Combines two functions together in a order.
|
default LLongToCharFunction |
boolToLongToCharFunc(LBoolToCharFunction after)
Combines two functions together in a order.
|
default LLongToDblFunction |
boolToLongToDblFunc(LBoolToDblFunction after)
Combines two functions together in a order.
|
default LLongToFltFunction |
boolToLongToFltFunc(LBoolToFltFunction after)
Combines two functions together in a order.
|
default LLongToIntFunction |
boolToLongToIntFunc(LBoolToIntFunction after)
Combines two functions together in a order.
|
default LLongToSrtFunction |
boolToLongToSrtFunc(LBoolToSrtFunction after)
Combines two functions together in a order.
|
default LLongUnaryOperator |
boolToLongUnaryOp(LBoolToLongFunction after)
Combines two functions together in a order.
|
static boolean |
call(long a,
LLongPredicate lambda) |
default LBoolSupplier |
capture(long a)
Captures arguments but delays the evaluation.
|
default LLongPredicate |
compose(LLongUnaryOperator before)
Allows to manipulate the domain of the function.
|
static LLongPredicate |
composed(LLongUnaryOperator before,
LLongPredicate after) |
static <V> LPredicate<V> |
composed(LToLongFunction<? super V> before,
LLongPredicate after) |
static LLongPredicate |
constant(boolean r)
Creates function that always returns the same value.
|
default boolean |
doApplyAsBoolean(long a)
For convenience, where “test()” makes things more confusing than “applyAsBoolean()”.
|
default boolean |
doIf(long a,
LAction action) |
default boolean |
doIf(long a,
LLongConsumer consumer) |
static boolean |
doIf(long a,
LLongPredicate predicate,
LAction action) |
static boolean |
doIf(long a,
LLongPredicate predicate,
LLongConsumer consumer) |
default <V> boolean |
doIf(V a1,
int a2,
long a3,
LTieLongConsumer<? super V> consumer) |
default <V> int |
doIf(V a1,
int a2,
long a3,
LTieLongFunction<? super V> consumer) |
default <V> boolean |
doIf(V a1,
long a2,
LObjLongConsumer<V> consumer) |
static LLongPredicate |
failSafe(LLongPredicate func,
LLongPredicate failSafe) |
default boolean |
failSafeTest(long a,
LLongPredicate failSafe) |
static boolean |
failSafeTest(long a,
LLongPredicate func,
LLongPredicate failSafe) |
default <C0> void |
filterForEach(IndexedRead<C0,aType.aLong> ia,
C0 source,
LLongConsumer consumer)
For each element (or tuple) from arguments, calls the consumer if predicate test passes.
|
default <C0,I0> void |
filterIterate(SequentialRead<C0,I0,aType.aLong> sa,
C0 source,
LLongConsumer consumer)
For each element (or tuple) from arguments, calls the consumer if predicate test passes.
|
static void |
fromTill(long min_a,
long max_a,
LLongPredicate func)
From-To.
|
static void |
fromTo(long min_a,
long max_a,
LLongPredicate func)
From-To.
|
default String |
functionalInterfaceDescription()
Returns description of the functional interface.
|
default LLongPredicate |
handling(HandlingInstructions<Throwable,RuntimeException> handling) |
default boolean |
handlingTest(long a,
HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
|
static boolean |
handlingTest(long a,
LLongPredicate func,
HandlingInstructions<Throwable,RuntimeException> handling) |
static LLongPredicate |
isEqual(long target)
Creates predicate that evaluates if an object is equal with the argument one.
|
static LLongPredicate |
longPred(LLongPredicate 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> |
longPredCompose(LToLongFunction<? super V> before)
Allows to manipulate the domain of the function.
|
static LLongPredicate |
longPredThrowing(ExF<Throwable> exF) |
static LLongPredicate |
longPredThrowing(String message,
ExMF<Throwable> exF) |
default LLongPredicate |
negate()
Returns a predicate that represents the logical negation of this predicate.
|
default boolean |
nestingTest(long a)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
|
default boolean |
nonNullTest(long a)
Just to mirror the method: Ensures the result is not null
|
default LLongPredicate |
or(LLongPredicate other)
Returns a predicate that represents the logical OR of evaluation of this predicate and the argument one.
|
static LLongPredicate |
recursive(LFunction<LLongPredicate,LLongPredicate> selfLambda) |
static LLongPredicate |
safe()
Safe instance.
|
static LLongPredicate |
safe(LLongPredicate other)
Safe wrapping.
|
static LSupplier<LLongPredicate> |
safeSupplier()
Safe instance supplier.
|
static LSupplier<LLongPredicate> |
safeSupplier(LSupplier<LLongPredicate> supplier)
Safe supplier.
|
default boolean |
shovingTest(long a)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
|
default boolean |
test(long a) |
default boolean |
test(long a,
ExWF<RuntimeException> exF) |
default boolean |
test(long a,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default boolean |
testThen(long a,
LPredicate<Throwable> handler) |
boolean |
testX(long a)
Implement this, but call test(long a)
|
static void |
throwIf(long a,
LLongPredicate pred,
ExMF<RuntimeException> factory,
String newMessage,
Object... messageParams) |
static void |
throwIfNot(long a,
LLongPredicate pred,
ExMF<RuntimeException> factory,
String newMessage,
Object... messageParams) |
default <V,C0> int |
tieForEach(V v,
IndexedRead<C0,aType.aLong> ia,
C0 source,
LTieLongConsumer<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.aLong> sa,
C0 source,
LTieLongConsumer<V> consumer)
For each element (or tuple) from arguments, calls the consumer (with index) if predicate test passes.
|
static void |
times(long max_a,
LLongPredicate func)
From-To.
|
default LLongPredicate |
trying(ExWF<RuntimeException> exF) |
default LLongPredicate |
trying(ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default LLongPredicate |
tryingThen(LPredicate<Throwable> handler) |
static boolean |
tryTest(long a,
LLongPredicate func) |
static boolean |
tryTest(long a,
LLongPredicate func,
ExWF<RuntimeException> exF) |
static boolean |
tryTest(long a,
LLongPredicate func,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
static boolean |
tryTestThen(long a,
LLongPredicate func,
LPredicate<Throwable> handler) |
default boolean |
tupleTest(LLongSingle args) |
static LLongPredicate |
wrap(java.util.function.LongPredicate other)
Wraps JRE instance.
|
default LLongPredicate |
xor(LLongPredicate 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(long a)
test in interface java.util.function.LongPredicateboolean testX(long a)
throws Throwable
Implement this, but call test(long a)
Throwabledefault boolean tupleTest(LLongSingle args)
default boolean handlingTest(long a,
HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
default LLongPredicate handling(HandlingInstructions<Throwable,RuntimeException> handling)
default boolean test(long a,
@Nonnull
ExWMF<RuntimeException> exF,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
default LLongPredicate trying(@Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default boolean test(long a,
@Nonnull
ExWF<RuntimeException> exF)
default LLongPredicate trying(@Nonnull ExWF<RuntimeException> exF)
default boolean testThen(long a,
@Nonnull
LPredicate<Throwable> handler)
default LLongPredicate tryingThen(@Nonnull LPredicate<Throwable> handler)
default boolean nestingTest(long a)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
default boolean shovingTest(long a)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
static boolean handlingTest(long a,
LLongPredicate func,
HandlingInstructions<Throwable,RuntimeException> handling)
static boolean tryTest(long a,
LLongPredicate func)
static boolean tryTest(long a,
LLongPredicate func,
@Nonnull
ExWMF<RuntimeException> exF,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
static boolean tryTest(long a,
LLongPredicate func,
@Nonnull
ExWF<RuntimeException> exF)
static boolean tryTestThen(long a,
LLongPredicate func,
@Nonnull
LPredicate<Throwable> handler)
default boolean failSafeTest(long a,
@Nonnull
LLongPredicate failSafe)
static boolean failSafeTest(long a,
LLongPredicate func,
@Nonnull
LLongPredicate failSafe)
static LLongPredicate failSafe(LLongPredicate func, @Nonnull LLongPredicate failSafe)
default boolean doIf(long a,
LAction action)
static boolean doIf(long a,
@Nonnull
LLongPredicate predicate,
@Nonnull
LAction action)
static boolean doIf(long a,
@Nonnull
LLongPredicate predicate,
@Nonnull
LLongConsumer consumer)
default boolean doIf(long a,
@Nonnull
LLongConsumer consumer)
static void throwIf(long a,
LLongPredicate pred,
ExMF<RuntimeException> factory,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
static void throwIfNot(long a,
LLongPredicate pred,
ExMF<RuntimeException> factory,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
default boolean nonNullTest(long a)
Just to mirror the method: Ensures the result is not null
default boolean doApplyAsBoolean(long 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,
long a2,
LObjLongConsumer<V> consumer)
default <V> boolean doIf(V a1,
int a2,
long a3,
LTieLongConsumer<? super V> consumer)
default <V> int doIf(V a1,
int a2,
long a3,
LTieLongFunction<? super V> consumer)
static void fromTo(long min_a,
long max_a,
LLongPredicate func)
From-To. Intended to be used with non-capturing lambda.
static void fromTill(long min_a,
long max_a,
LLongPredicate func)
From-To. Intended to be used with non-capturing lambda.
static void times(long max_a,
LLongPredicate func)
From-To. Intended to be used with non-capturing lambda.
default LBoolSupplier capture(long a)
Captures arguments but delays the evaluation.
static LLongPredicate constant(boolean r)
Creates function that always returns the same value.
@Nonnull static LLongPredicate longPred(@Nonnull LLongPredicate lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
@Nonnull static LLongPredicate recursive(@Nonnull LFunction<LLongPredicate,LLongPredicate> selfLambda)
@Nonnull static LLongPredicate longPredThrowing(@Nonnull ExF<Throwable> exF)
@Nonnull static LLongPredicate longPredThrowing(String message, @Nonnull ExMF<Throwable> exF)
static boolean call(long a,
@Nonnull
LLongPredicate lambda)
@Nonnull static LLongPredicate wrap(java.util.function.LongPredicate other)
Wraps JRE instance.
@Nonnull static LLongPredicate safe()
Safe instance. That always returns the same value (as alwaysFalse).
@Nonnull static LSupplier<LLongPredicate> safeSupplier()
Safe instance supplier. Returns supplier of safe() instance.
@Nonnull static LLongPredicate safe(@Nullable LLongPredicate other)
Safe wrapping. Either argument function is returned (if it is not null) or safe() instance.
@Nonnull static LSupplier<LLongPredicate> safeSupplier(@Nullable LSupplier<LLongPredicate> supplier)
Safe supplier. Either argument supplier is returned (if it is not null) or supplier of safe() instance.
@Nonnull default LLongPredicate negate()
Returns a predicate that represents the logical negation of this predicate.
negate in interface java.util.function.LongPredicatejava.util.function.Predicate#negate}@Nonnull default LLongPredicate and(@Nonnull LLongPredicate 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 LLongPredicate or(@Nonnull LLongPredicate 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 LLongPredicate xor(@Nonnull LLongPredicate 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 LLongPredicate isEqual(long target)
Creates predicate that evaluates if an object is equal with the argument one.
java.util.function.Predicate#isEqual()@Nonnull default LLongPredicate compose(@Nonnull LLongUnaryOperator before)
Allows to manipulate the domain of the function.
static LLongPredicate composed(@Nonnull LLongUnaryOperator before, LLongPredicate after)
@Nonnull default <V> LPredicate<V> longPredCompose(@Nonnull LToLongFunction<? super V> before)
Allows to manipulate the domain of the function.
static <V> LPredicate<V> composed(@Nonnull LToLongFunction<? super V> before, LLongPredicate after)
@Nonnull default <V> LLongFunction<V> boolToLongFunc(@Nonnull LBoolFunction<? extends V> after)
Combines two functions together in a order.
@Nonnull default LLongToByteFunction boolToLongToByteFunc(@Nonnull LBoolToByteFunction after)
Combines two functions together in a order.
@Nonnull default LLongToSrtFunction boolToLongToSrtFunc(@Nonnull LBoolToSrtFunction after)
Combines two functions together in a order.
@Nonnull default LLongToIntFunction boolToLongToIntFunc(@Nonnull LBoolToIntFunction after)
Combines two functions together in a order.
@Nonnull default LLongUnaryOperator boolToLongUnaryOp(@Nonnull LBoolToLongFunction after)
Combines two functions together in a order.
@Nonnull default LLongToFltFunction boolToLongToFltFunc(@Nonnull LBoolToFltFunction after)
Combines two functions together in a order.
@Nonnull default LLongToDblFunction boolToLongToDblFunc(@Nonnull LBoolToDblFunction after)
Combines two functions together in a order.
@Nonnull default LLongToCharFunction boolToLongToCharFunc(@Nonnull LBoolToCharFunction after)
Combines two functions together in a order.
@Nonnull default LLongPredicate boolToLongPred(@Nonnull LLogicalOperator after)
Combines two functions together in a order.
static boolean alwaysTrue(long a)
Returns TRUE.
static boolean alwaysFalse(long a)
Returns FALSE.
default <C0> void filterForEach(IndexedRead<C0,aType.aLong> ia, C0 source, LLongConsumer 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.aLong> sa, C0 source, LLongConsumer 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.aLong> ia,
C0 source,
LTieLongConsumer<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.aLong> sa,
C0 source,
LTieLongConsumer<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.