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