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