@FunctionalInterface public interface LSrtPredicate extends MetaPredicate, MetaInterface.NonThrowing, Codomain<aType.aBool>, Domain1<aType.aShort>
Non-throwing functional interface (lambda) LSrtPredicate for Java 8.
Type: predicate
Domain (lvl: 1): short a
Co-domain: boolean
| Modifier and Type | Interface and Description |
|---|---|
static class |
LSrtPredicate.LSrtPredicateSingle |
MetaInterface.NonThrowing, MetaInterface.Throwing<X>| Modifier and Type | Field and Description |
|---|---|
static String |
DESCRIPTION |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
alwaysFalse(short a)
Returns FALSE.
|
static boolean |
alwaysTrue(short a)
Returns TRUE.
|
default LSrtPredicate |
and(LSrtPredicate other)
Returns a predicate that represents the logical AND of evaluation of this predicate and the argument one.
|
default <V> LSrtFunction<V> |
boolToSrtFunc(LBoolFunction<? extends V> after)
Combines two functions together in a order.
|
default LSrtPredicate |
boolToSrtPred(LLogicalOperator after)
Combines two functions together in a order.
|
default LSrtToByteFunction |
boolToSrtToByteFunc(LBoolToByteFunction after)
Combines two functions together in a order.
|
default LSrtToCharFunction |
boolToSrtToCharFunc(LBoolToCharFunction after)
Combines two functions together in a order.
|
default LSrtToDblFunction |
boolToSrtToDblFunc(LBoolToDblFunction after)
Combines two functions together in a order.
|
default LSrtToFltFunction |
boolToSrtToFltFunc(LBoolToFltFunction after)
Combines two functions together in a order.
|
default LSrtToIntFunction |
boolToSrtToIntFunc(LBoolToIntFunction after)
Combines two functions together in a order.
|
default LSrtToLongFunction |
boolToSrtToLongFunc(LBoolToLongFunction after)
Combines two functions together in a order.
|
default LSrtUnaryOperator |
boolToSrtUnaryOp(LBoolToSrtFunction after)
Combines two functions together in a order.
|
static boolean |
call(short a,
LSrtPredicate lambda) |
default LBoolSupplier |
capture(short a)
Captures arguments but delays the evaluation.
|
default LSrtPredicate |
compose(LSrtUnaryOperator before)
Allows to manipulate the domain of the function.
|
static LSrtPredicate |
composed(LSrtUnaryOperator before,
LSrtPredicate after) |
static <V> LPredicate<V> |
composed(LToSrtFunction<? super V> before,
LSrtPredicate after) |
static LSrtPredicate |
constant(boolean r)
Creates function that always returns the same value.
|
default boolean |
doApplyAsBoolean(short a)
For convenience, where “test()” makes things more confusing than “applyAsBoolean()”.
|
default boolean |
doIf(short a,
LAction action) |
default boolean |
doIf(short a,
LSrtConsumer consumer) |
static boolean |
doIf(short a,
LSrtPredicate predicate,
LAction action) |
static boolean |
doIf(short a,
LSrtPredicate predicate,
LSrtConsumer 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) |
default <V> boolean |
doIf(V a1,
short a2,
LObjSrtConsumer<V> consumer) |
static LSrtPredicate |
failSafe(LSrtPredicate func,
LSrtPredicate failSafe) |
default boolean |
failSafeTest(short a,
LSrtPredicate failSafe) |
static boolean |
failSafeTest(short a,
LSrtPredicate func,
LSrtPredicate failSafe) |
default <C0> void |
filterForEach(IndexedRead<C0,aType.aShort> ia,
C0 source,
LSrtConsumer consumer)
For each element (or tuple) from arguments, calls the consumer if predicate test passes.
|
default <C0,I0> void |
filterIterate(SequentialRead<C0,I0,aType.aShort> sa,
C0 source,
LSrtConsumer consumer)
For each element (or tuple) from arguments, calls the consumer if predicate test passes.
|
static void |
fromTill(int min_i,
int max_i,
short a,
LSrtPredicate func)
From-To.
|
static void |
fromTo(int min_i,
int max_i,
short a,
LSrtPredicate func)
From-To.
|
default String |
functionalInterfaceDescription()
Returns description of the functional interface.
|
default LSrtPredicate |
handling(HandlingInstructions<Throwable,RuntimeException> handling) |
default boolean |
handlingTest(short a,
HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
|
static boolean |
handlingTest(short a,
LSrtPredicate func,
HandlingInstructions<Throwable,RuntimeException> handling) |
static LSrtPredicate |
isEqual(short target)
Creates predicate that evaluates if an object is equal with the argument one.
|
default LSrtPredicate |
negate()
Returns a predicate that represents the logical negation of this predicate.
|
default boolean |
nestingTest(short a)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
|
default boolean |
nonNullTest(short a)
Just to mirror the method: Ensures the result is not null
|
default LSrtPredicate |
or(LSrtPredicate other)
Returns a predicate that represents the logical OR of evaluation of this predicate and the argument one.
|
static LSrtPredicate |
recursive(LFunction<LSrtPredicate,LSrtPredicate> selfLambda) |
static LSrtPredicate |
safe()
Safe instance.
|
static LSrtPredicate |
safe(LSrtPredicate other)
Safe wrapping.
|
static LSupplier<LSrtPredicate> |
safeSupplier()
Safe instance supplier.
|
static LSupplier<LSrtPredicate> |
safeSupplier(LSupplier<LSrtPredicate> supplier)
Safe supplier.
|
default boolean |
shovingTest(short a)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
|
static LSrtPredicate |
srtPred(LSrtPredicate 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> |
srtPredCompose(LToSrtFunction<? super V> before)
Allows to manipulate the domain of the function.
|
static LSrtPredicate |
srtPredThrowing(ExF<Throwable> exF) |
static LSrtPredicate |
srtPredThrowing(String message,
ExMF<Throwable> exF) |
default boolean |
test(short a) |
default boolean |
test(short a,
ExWF<RuntimeException> exF) |
default boolean |
test(short a,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default boolean |
testThen(short a,
LPredicate<Throwable> handler) |
boolean |
testX(short a)
Implement this, but call test(short a)
|
static void |
throwIf(short a,
LSrtPredicate pred,
ExMF<RuntimeException> factory,
String newMessage,
Object... messageParams) |
static void |
throwIfNot(short a,
LSrtPredicate pred,
ExMF<RuntimeException> factory,
String newMessage,
Object... messageParams) |
default <V,C0> int |
tieForEach(V v,
IndexedRead<C0,aType.aShort> ia,
C0 source,
LTieSrtConsumer<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.aShort> sa,
C0 source,
LTieSrtConsumer<V> consumer)
For each element (or tuple) from arguments, calls the consumer (with index) if predicate test passes.
|
static void |
times(int max_i,
short a,
LSrtPredicate func)
From-To.
|
default LSrtPredicate |
trying(ExWF<RuntimeException> exF) |
default LSrtPredicate |
trying(ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default LSrtPredicate |
tryingThen(LPredicate<Throwable> handler) |
static boolean |
tryTest(short a,
LSrtPredicate func) |
static boolean |
tryTest(short a,
LSrtPredicate func,
ExWF<RuntimeException> exF) |
static boolean |
tryTest(short a,
LSrtPredicate func,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
static boolean |
tryTestThen(short a,
LSrtPredicate func,
LPredicate<Throwable> handler) |
default boolean |
tupleTest(LSrtSingle args) |
default LSrtPredicate |
xor(LSrtPredicate 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 a)
boolean testX(short a)
throws Throwable
Implement this, but call test(short a)
Throwabledefault boolean tupleTest(LSrtSingle args)
default boolean handlingTest(short a,
HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
default LSrtPredicate handling(HandlingInstructions<Throwable,RuntimeException> handling)
default boolean test(short a,
@Nonnull
ExWMF<RuntimeException> exF,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
default LSrtPredicate trying(@Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default boolean test(short a,
@Nonnull
ExWF<RuntimeException> exF)
default LSrtPredicate trying(@Nonnull ExWF<RuntimeException> exF)
default boolean testThen(short a,
@Nonnull
LPredicate<Throwable> handler)
default LSrtPredicate tryingThen(@Nonnull LPredicate<Throwable> handler)
default boolean nestingTest(short a)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
default boolean shovingTest(short a)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
static boolean handlingTest(short a,
LSrtPredicate func,
HandlingInstructions<Throwable,RuntimeException> handling)
static boolean tryTest(short a,
LSrtPredicate func)
static boolean tryTest(short a,
LSrtPredicate func,
@Nonnull
ExWMF<RuntimeException> exF,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
static boolean tryTest(short a,
LSrtPredicate func,
@Nonnull
ExWF<RuntimeException> exF)
static boolean tryTestThen(short a,
LSrtPredicate func,
@Nonnull
LPredicate<Throwable> handler)
default boolean failSafeTest(short a,
@Nonnull
LSrtPredicate failSafe)
static boolean failSafeTest(short a,
LSrtPredicate func,
@Nonnull
LSrtPredicate failSafe)
static LSrtPredicate failSafe(LSrtPredicate func, @Nonnull LSrtPredicate failSafe)
default boolean doIf(short a,
LAction action)
static boolean doIf(short a,
@Nonnull
LSrtPredicate predicate,
@Nonnull
LAction action)
static boolean doIf(short a,
@Nonnull
LSrtPredicate predicate,
@Nonnull
LSrtConsumer consumer)
default boolean doIf(short a,
@Nonnull
LSrtConsumer consumer)
static void throwIf(short a,
LSrtPredicate pred,
ExMF<RuntimeException> factory,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
static void throwIfNot(short a,
LSrtPredicate pred,
ExMF<RuntimeException> factory,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
default boolean nonNullTest(short a)
Just to mirror the method: Ensures the result is not null
default boolean doApplyAsBoolean(short 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,
short a2,
LObjSrtConsumer<V> 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 void fromTo(int min_i,
int max_i,
short a,
LSrtPredicate func)
From-To. Intended to be used with non-capturing lambda.
static void fromTill(int min_i,
int max_i,
short a,
LSrtPredicate func)
From-To. Intended to be used with non-capturing lambda.
static void times(int max_i,
short a,
LSrtPredicate func)
From-To. Intended to be used with non-capturing lambda.
default LBoolSupplier capture(short a)
Captures arguments but delays the evaluation.
static LSrtPredicate constant(boolean r)
Creates function that always returns the same value.
@Nonnull static LSrtPredicate srtPred(@Nonnull LSrtPredicate lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
@Nonnull static LSrtPredicate recursive(@Nonnull LFunction<LSrtPredicate,LSrtPredicate> selfLambda)
@Nonnull static LSrtPredicate srtPredThrowing(@Nonnull ExF<Throwable> exF)
@Nonnull static LSrtPredicate srtPredThrowing(String message, @Nonnull ExMF<Throwable> exF)
static boolean call(short a,
@Nonnull
LSrtPredicate lambda)
@Nonnull static LSrtPredicate safe()
Safe instance. That always returns the same value (as alwaysFalse).
@Nonnull static LSupplier<LSrtPredicate> safeSupplier()
Safe instance supplier. Returns supplier of safe() instance.
@Nonnull static LSrtPredicate safe(@Nullable LSrtPredicate other)
Safe wrapping. Either argument function is returned (if it is not null) or safe() instance.
@Nonnull static LSupplier<LSrtPredicate> safeSupplier(@Nullable LSupplier<LSrtPredicate> supplier)
Safe supplier. Either argument supplier is returned (if it is not null) or supplier of safe() instance.
@Nonnull default LSrtPredicate negate()
Returns a predicate that represents the logical negation of this predicate.
java.util.function.Predicate#negate}@Nonnull default LSrtPredicate and(@Nonnull LSrtPredicate 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 LSrtPredicate or(@Nonnull LSrtPredicate 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 LSrtPredicate xor(@Nonnull LSrtPredicate 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 LSrtPredicate isEqual(short target)
Creates predicate that evaluates if an object is equal with the argument one.
java.util.function.Predicate#isEqual()@Nonnull default LSrtPredicate compose(@Nonnull LSrtUnaryOperator before)
Allows to manipulate the domain of the function.
static LSrtPredicate composed(@Nonnull LSrtUnaryOperator before, LSrtPredicate after)
@Nonnull default <V> LPredicate<V> srtPredCompose(@Nonnull LToSrtFunction<? super V> before)
Allows to manipulate the domain of the function.
static <V> LPredicate<V> composed(@Nonnull LToSrtFunction<? super V> before, LSrtPredicate after)
@Nonnull default <V> LSrtFunction<V> boolToSrtFunc(@Nonnull LBoolFunction<? extends V> after)
Combines two functions together in a order.
@Nonnull default LSrtToByteFunction boolToSrtToByteFunc(@Nonnull LBoolToByteFunction after)
Combines two functions together in a order.
@Nonnull default LSrtUnaryOperator boolToSrtUnaryOp(@Nonnull LBoolToSrtFunction after)
Combines two functions together in a order.
@Nonnull default LSrtToIntFunction boolToSrtToIntFunc(@Nonnull LBoolToIntFunction after)
Combines two functions together in a order.
@Nonnull default LSrtToLongFunction boolToSrtToLongFunc(@Nonnull LBoolToLongFunction after)
Combines two functions together in a order.
@Nonnull default LSrtToFltFunction boolToSrtToFltFunc(@Nonnull LBoolToFltFunction after)
Combines two functions together in a order.
@Nonnull default LSrtToDblFunction boolToSrtToDblFunc(@Nonnull LBoolToDblFunction after)
Combines two functions together in a order.
@Nonnull default LSrtToCharFunction boolToSrtToCharFunc(@Nonnull LBoolToCharFunction after)
Combines two functions together in a order.
@Nonnull default LSrtPredicate boolToSrtPred(@Nonnull LLogicalOperator after)
Combines two functions together in a order.
static boolean alwaysTrue(short a)
Returns TRUE.
static boolean alwaysFalse(short a)
Returns FALSE.
default <C0> void filterForEach(IndexedRead<C0,aType.aShort> ia, C0 source, LSrtConsumer 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.aShort> sa, C0 source, LSrtConsumer 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.aShort> ia,
C0 source,
LTieSrtConsumer<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.aShort> sa,
C0 source,
LTieSrtConsumer<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.