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