@FunctionalInterface public interface LObjLongPredicate<T> extends MetaPredicate, MetaInterface.NonThrowing, Codomain<aType.aBool>, Domain2<aType.a<T>,aType.aLong>
Non-throwing functional interface (lambda) LObjLongPredicate for Java 8.
Type: predicate
Domain (lvl: 2): T a1,long a2
Co-domain: boolean
| Modifier and Type | Interface and Description |
|---|---|
static interface |
LObjLongPredicate.LLongObjPred<T>
Permutation of LObjLongPredicate for method references.
|
static class |
LObjLongPredicate.LObjLongPredicateSingle<T> |
MetaInterface.NonThrowing, MetaInterface.Throwing<X>| Modifier and Type | Field and Description |
|---|---|
static String |
DESCRIPTION |
| Modifier and Type | Method and Description |
|---|---|
static <T> boolean |
alwaysFalse(long a2,
T a1)
Returns FALSE.
|
static <T> boolean |
alwaysFalse(T a1,
long a2)
Returns FALSE.
|
static <T> boolean |
alwaysTrue(long a2,
T a1)
Returns TRUE.
|
static <T> boolean |
alwaysTrue(T a1,
long a2)
Returns TRUE.
|
default LObjLongPredicate<T> |
and(LObjLongPredicate<? super T> other)
Returns a predicate that represents the logical AND of evaluation of this predicate and the argument one.
|
default <V> LObjLongFunction<T,V> |
boolToObjLongFunc(LBoolFunction<? extends V> after)
Combines two functions together in a order.
|
default LObjLongPredicate<T> |
boolToObjLongPred(LLogicalOperator after)
Combines two functions together in a order.
|
static <T> boolean |
call(T a1,
long a2,
LObjLongPredicate<T> lambda) |
default LBoolSupplier |
capture(T a1,
long a2)
Captures arguments but delays the evaluation.
|
default <V2> LObjLongPredicate<V2> |
cast()
Cast that replace generics.
|
static <V2,T> LObjLongPredicate<V2> |
cast(LObjLongPredicate<T> function)
Cast that replace generics.
|
default <V1> LObjLongPredicate<V1> |
compose(LFunction<? super V1,? extends T> before1,
LLongUnaryOperator before2)
Allows to manipulate the domain of the function.
|
static <V1,T> LObjLongPredicate<V1> |
composed(LFunction<? super V1,? extends T> before1,
LLongUnaryOperator before2,
LObjLongPredicate<T> after) |
static <V1,V2,T> LBiPredicate<V1,V2> |
composed(LFunction<? super V1,? extends T> before1,
LToLongFunction<? super V2> before2,
LObjLongPredicate<T> after) |
static <T> LObjLongPredicate<T> |
constant(boolean r)
Creates function that always returns the same value.
|
default boolean |
doApplyAsBoolean(T a1,
long a2)
For convenience, where “test()” makes things more confusing than “applyAsBoolean()”.
|
default boolean |
doIf(T a1,
long a2,
LAction action) |
default boolean |
doIf(T a1,
long a2,
LObjLongConsumer<? super T> consumer) |
static <T> boolean |
doIf(T a1,
long a2,
LObjLongPredicate<T> predicate,
LAction action) |
static <T> boolean |
doIf(T a1,
long a2,
LObjLongPredicate<T> predicate,
LObjLongConsumer<? super T> consumer) |
default <V> boolean |
doIf(V a1,
T a2,
long a3,
LBiObjLongConsumer<V,? super T> consumer) |
static <T> LObjLongPredicate<T> |
failSafe(LObjLongPredicate<T> func,
LObjLongPredicate<T> failSafe) |
default boolean |
failSafeTest(T a1,
long a2,
LObjLongPredicate<T> failSafe) |
static <T> boolean |
failSafeTest(T a1,
long a2,
LObjLongPredicate<T> func,
LObjLongPredicate<T> failSafe) |
default <C1,C2> void |
filterForEach(IndexedRead<C1,aType.a<T>> ia1,
C1 source1,
IndexedRead<C2,aType.aLong> ia2,
C2 source2,
LObjLongConsumer<? super T> consumer)
For each element (or tuple) from arguments, calls the consumer if predicate test passes.
|
default <C1,C2,I2> void |
filterIterate(IndexedRead<C1,aType.a<T>> ia1,
C1 source1,
SequentialRead<C2,I2,aType.aLong> sa2,
C2 source2,
LObjLongConsumer<? super T> 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.a<T>> sa1,
C1 source1,
IndexedRead<C2,aType.aLong> ia2,
C2 source2,
LObjLongConsumer<? super T> 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.a<T>> sa1,
C1 source1,
SequentialRead<C2,I2,aType.aLong> sa2,
C2 source2,
LObjLongConsumer<? super T> consumer)
For each element (or tuple) from arguments, calls the consumer if predicate test passes.
|
static <T> void |
fromTill(long min_a2,
long max_a2,
T a1,
LObjLongPredicate<T> func)
From-To.
|
static <T> void |
fromTo(long min_a2,
long max_a2,
T a1,
LObjLongPredicate<T> func)
From-To.
|
default String |
functionalInterfaceDescription()
Returns description of the functional interface.
|
default LObjLongPredicate<T> |
handling(HandlingInstructions<Throwable,RuntimeException> handling) |
default boolean |
handlingTest(T a1,
long a2,
HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
|
static <T> boolean |
handlingTest(T a1,
long a2,
LObjLongPredicate<T> func,
HandlingInstructions<Throwable,RuntimeException> handling) |
static <T> LObjLongPredicate<T> |
isEqual(T v1,
long v2)
Creates predicate that evaluates if an object is equal with the argument one.
|
static <T> LObjLongPredicate.LLongObjPred<T> |
longObjPred(LObjLongPredicate.LLongObjPred<T> lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
|
default LLongPredicate |
lShrink(LLongFunction<T> left) |
default LLongPredicate |
lShrinkc(T a1) |
static <T> LLongPredicate |
lShrinked(LLongFunction<T> left,
LObjLongPredicate<T> func) |
static <T> LLongPredicate |
lShrinkedc(T a1,
LObjLongPredicate<T> func) |
default LObjLongPredicate<T> |
negate()
Returns a predicate that represents the logical negation of this predicate.
|
default boolean |
nestingTest(T a1,
long a2)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
|
default boolean |
nonNullTest(T a1,
long a2)
Just to mirror the method: Ensures the result is not null
|
static <T> LObjLongPredicate<T> |
objLongPred(LObjLongPredicate<T> 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> |
objLongPredCompose(LFunction<? super V1,? extends T> before1,
LToLongFunction<? super V2> before2)
Allows to manipulate the domain of the function.
|
static <T> LObjLongPredicate<T> |
objLongPredThrowing(ExF<Throwable> exF) |
static <T> LObjLongPredicate<T> |
objLongPredThrowing(String message,
ExMF<Throwable> exF) |
default LObjLongPredicate<T> |
or(LObjLongPredicate<? super T> other)
Returns a predicate that represents the logical OR of evaluation of this predicate and the argument one.
|
static <T> LObjLongPredicate<T> |
recursive(LFunction<LObjLongPredicate<T>,LObjLongPredicate<T>> selfLambda) |
default LPredicate<T> |
rShrink(LToLongFunction<T> right) |
default LPredicate<T> |
rShrinkc(long a2) |
static <T> LPredicate<T> |
rShrinked(LToLongFunction<T> right,
LObjLongPredicate<T> func) |
static <T> LPredicate<T> |
rShrinkedc(long a2,
LObjLongPredicate<T> func) |
static <T> LObjLongPredicate<T> |
safe()
Safe instance.
|
static <T> LObjLongPredicate<T> |
safe(LObjLongPredicate<T> other)
Safe wrapping.
|
static <T> LSupplier<LObjLongPredicate<T>> |
safeSupplier()
Safe instance supplier.
|
static <T> LSupplier<LObjLongPredicate<T>> |
safeSupplier(LSupplier<LObjLongPredicate<T>> supplier)
Safe supplier.
|
default boolean |
shovingTest(T a1,
long a2)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
|
default boolean |
test(T a1,
long a2) |
default boolean |
test(T a1,
long a2,
ExWF<RuntimeException> exF) |
default boolean |
test(T a1,
long a2,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
static <T> LObjLongPredicate<T> |
test1st(LPredicate<T> func)
Captures single parameter function into this interface where only 1st parameter will be used.
|
static <T> LObjLongPredicate<T> |
test2nd(LLongPredicate func)
Captures single parameter function into this interface where only 2nd parameter will be used.
|
default boolean |
testThen(T a1,
long a2,
LPredicate<Throwable> handler) |
boolean |
testX(T a1,
long a2)
Implement this, but call test(T a1,long a2)
|
static <T> void |
throwIf(T a1,
long a2,
LObjLongPredicate<T> pred,
ExMF<RuntimeException> factory,
String newMessage,
Object... messageParams) |
static <T> void |
throwIfNot(T a1,
long a2,
LObjLongPredicate<T> pred,
ExMF<RuntimeException> factory,
String newMessage,
Object... messageParams) |
static <T> void |
times(long max_a2,
T a1,
LObjLongPredicate<T> func)
From-To.
|
default LObjLongPredicate<T> |
trying(ExWF<RuntimeException> exF) |
default LObjLongPredicate<T> |
trying(ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default LObjLongPredicate<T> |
tryingThen(LPredicate<Throwable> handler) |
static <T> boolean |
tryTest(T a1,
long a2,
LObjLongPredicate<T> func) |
static <T> boolean |
tryTest(T a1,
long a2,
LObjLongPredicate<T> func,
ExWF<RuntimeException> exF) |
static <T> boolean |
tryTest(T a1,
long a2,
LObjLongPredicate<T> func,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
static <T> boolean |
tryTestThen(T a1,
long a2,
LObjLongPredicate<T> func,
LPredicate<Throwable> handler) |
default boolean |
tupleTest(LObjLongPair<T> args) |
static <T> LObjLongPredicate<T> |
uncurry(LFunction<T,LLongPredicate> func) |
default LObjLongPredicate |
untyped()
Cast that removes generics.
|
default LObjLongPredicate<T> |
xor(LObjLongPredicate<? super T> 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(T a1, long a2)
boolean testX(T a1, long a2) throws Throwable
Implement this, but call test(T a1,long a2)
Throwabledefault boolean tupleTest(LObjLongPair<T> args)
default boolean handlingTest(T a1, long a2, HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
default LObjLongPredicate<T> handling(HandlingInstructions<Throwable,RuntimeException> handling)
default boolean test(T a1, long a2, @Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default LObjLongPredicate<T> trying(@Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default boolean test(T a1, long a2, @Nonnull ExWF<RuntimeException> exF)
default LObjLongPredicate<T> trying(@Nonnull ExWF<RuntimeException> exF)
default boolean testThen(T a1, long a2, @Nonnull LPredicate<Throwable> handler)
default LObjLongPredicate<T> tryingThen(@Nonnull LPredicate<Throwable> handler)
default boolean nestingTest(T a1, long a2)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
default boolean shovingTest(T a1, long a2)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
static <T> boolean handlingTest(T a1,
long a2,
LObjLongPredicate<T> func,
HandlingInstructions<Throwable,RuntimeException> handling)
static <T> boolean tryTest(T a1,
long a2,
LObjLongPredicate<T> func)
static <T> boolean tryTest(T a1,
long a2,
LObjLongPredicate<T> func,
@Nonnull
ExWMF<RuntimeException> exF,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
static <T> boolean tryTest(T a1,
long a2,
LObjLongPredicate<T> func,
@Nonnull
ExWF<RuntimeException> exF)
static <T> boolean tryTestThen(T a1,
long a2,
LObjLongPredicate<T> func,
@Nonnull
LPredicate<Throwable> handler)
default boolean failSafeTest(T a1, long a2, @Nonnull LObjLongPredicate<T> failSafe)
static <T> boolean failSafeTest(T a1,
long a2,
LObjLongPredicate<T> func,
@Nonnull
LObjLongPredicate<T> failSafe)
static <T> LObjLongPredicate<T> failSafe(LObjLongPredicate<T> func, @Nonnull LObjLongPredicate<T> failSafe)
static <T> boolean doIf(T a1,
long a2,
@Nonnull
LObjLongPredicate<T> predicate,
@Nonnull
LAction action)
static <T> boolean doIf(T a1,
long a2,
@Nonnull
LObjLongPredicate<T> predicate,
@Nonnull
LObjLongConsumer<? super T> consumer)
default boolean doIf(T a1, long a2, @Nonnull LObjLongConsumer<? super T> consumer)
static <T> void throwIf(T a1,
long a2,
LObjLongPredicate<T> pred,
ExMF<RuntimeException> factory,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
static <T> void throwIfNot(T a1,
long a2,
LObjLongPredicate<T> pred,
ExMF<RuntimeException> factory,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
default boolean nonNullTest(T a1, long a2)
Just to mirror the method: Ensures the result is not null
default boolean doApplyAsBoolean(T a1, long 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,
T a2,
long a3,
LBiObjLongConsumer<V,? super T> consumer)
static <T> void fromTo(long min_a2,
long max_a2,
T a1,
LObjLongPredicate<T> func)
From-To. Intended to be used with non-capturing lambda.
static <T> void fromTill(long min_a2,
long max_a2,
T a1,
LObjLongPredicate<T> func)
From-To. Intended to be used with non-capturing lambda.
static <T> void times(long max_a2,
T a1,
LObjLongPredicate<T> func)
From-To. Intended to be used with non-capturing lambda.
default LLongPredicate lShrink(LLongFunction<T> left)
default LLongPredicate lShrinkc(T a1)
static <T> LLongPredicate lShrinked(LLongFunction<T> left, LObjLongPredicate<T> func)
static <T> LLongPredicate lShrinkedc(T a1, LObjLongPredicate<T> func)
default LPredicate<T> rShrink(LToLongFunction<T> right)
default LPredicate<T> rShrinkc(long a2)
static <T> LPredicate<T> rShrinked(LToLongFunction<T> right, LObjLongPredicate<T> func)
static <T> LPredicate<T> rShrinkedc(long a2, LObjLongPredicate<T> func)
static <T> LObjLongPredicate<T> uncurry(LFunction<T,LLongPredicate> func)
default LObjLongPredicate untyped()
Cast that removes generics.
default <V2> LObjLongPredicate<V2> cast()
Cast that replace generics.
static <V2,T> LObjLongPredicate<V2> cast(LObjLongPredicate<T> function)
Cast that replace generics.
default LBoolSupplier capture(T a1, long a2)
Captures arguments but delays the evaluation.
static <T> LObjLongPredicate<T> constant(boolean r)
Creates function that always returns the same value.
@Nonnull static <T> LObjLongPredicate<T> test1st(@Nonnull LPredicate<T> func)
Captures single parameter function into this interface where only 1st parameter will be used.
@Nonnull static <T> LObjLongPredicate<T> test2nd(@Nonnull LLongPredicate func)
Captures single parameter function into this interface where only 2nd parameter will be used.
@Nonnull static <T> LObjLongPredicate<T> objLongPred(@Nonnull LObjLongPredicate<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> LObjLongPredicate<T> recursive(@Nonnull LFunction<LObjLongPredicate<T>,LObjLongPredicate<T>> selfLambda)
@Nonnull static <T> LObjLongPredicate<T> objLongPredThrowing(@Nonnull ExF<Throwable> exF)
@Nonnull static <T> LObjLongPredicate<T> objLongPredThrowing(String message, @Nonnull ExMF<Throwable> exF)
@Nonnull static <T> LObjLongPredicate.LLongObjPred<T> longObjPred(@Nonnull LObjLongPredicate.LLongObjPred<T> lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
static <T> boolean call(T a1,
long a2,
@Nonnull
LObjLongPredicate<T> lambda)
@Nonnull static <T> LObjLongPredicate<T> safe()
Safe instance. That always returns the same value (as alwaysFalse).
@Nonnull static <T> LSupplier<LObjLongPredicate<T>> safeSupplier()
Safe instance supplier. Returns supplier of safe() instance.
@Nonnull static <T> LObjLongPredicate<T> safe(@Nullable LObjLongPredicate<T> other)
Safe wrapping. Either argument function is returned (if it is not null) or safe() instance.
@Nonnull static <T> LSupplier<LObjLongPredicate<T>> safeSupplier(@Nullable LSupplier<LObjLongPredicate<T>> supplier)
Safe supplier. Either argument supplier is returned (if it is not null) or supplier of safe() instance.
@Nonnull default LObjLongPredicate<T> negate()
Returns a predicate that represents the logical negation of this predicate.
java.util.function.Predicate#negate}@Nonnull default LObjLongPredicate<T> and(@Nonnull LObjLongPredicate<? super T> 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 LObjLongPredicate<T> or(@Nonnull LObjLongPredicate<? super T> 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 LObjLongPredicate<T> xor(@Nonnull LObjLongPredicate<? super T> 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 <T> LObjLongPredicate<T> isEqual(T v1, long v2)
Creates predicate that evaluates if an object is equal with the argument one.
java.util.function.Predicate#isEqual()@Nonnull default <V1> LObjLongPredicate<V1> compose(@Nonnull LFunction<? super V1,? extends T> before1, @Nonnull LLongUnaryOperator before2)
Allows to manipulate the domain of the function.
static <V1,T> LObjLongPredicate<V1> composed(@Nonnull LFunction<? super V1,? extends T> before1, @Nonnull LLongUnaryOperator before2, LObjLongPredicate<T> after)
@Nonnull default <V1,V2> LBiPredicate<V1,V2> objLongPredCompose(@Nonnull LFunction<? super V1,? extends T> before1, @Nonnull LToLongFunction<? super V2> before2)
Allows to manipulate the domain of the function.
static <V1,V2,T> LBiPredicate<V1,V2> composed(@Nonnull LFunction<? super V1,? extends T> before1, @Nonnull LToLongFunction<? super V2> before2, LObjLongPredicate<T> after)
@Nonnull default <V> LObjLongFunction<T,V> boolToObjLongFunc(@Nonnull LBoolFunction<? extends V> after)
Combines two functions together in a order.
@Nonnull default LObjLongPredicate<T> boolToObjLongPred(@Nonnull LLogicalOperator after)
Combines two functions together in a order.
static <T> boolean alwaysTrue(T a1,
long a2)
Returns TRUE.
static <T> boolean alwaysFalse(T a1,
long a2)
Returns FALSE.
static <T> boolean alwaysTrue(long a2,
T a1)
Returns TRUE.
static <T> boolean alwaysFalse(long a2,
T a1)
Returns FALSE.
default <C1,C2> void filterForEach(IndexedRead<C1,aType.a<T>> ia1, C1 source1, IndexedRead<C2,aType.aLong> ia2, C2 source2, LObjLongConsumer<? super T> 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.a<T>> sa1, C1 source1, IndexedRead<C2,aType.aLong> ia2, C2 source2, LObjLongConsumer<? super T> 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.a<T>> ia1, C1 source1, SequentialRead<C2,I2,aType.aLong> sa2, C2 source2, LObjLongConsumer<? super T> 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.a<T>> sa1, C1 source1, SequentialRead<C2,I2,aType.aLong> sa2, C2 source2, LObjLongConsumer<? super T> 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.