Interface DoublePredicate
- All Superinterfaces:
DoublePredicate
An enhanced double predicate.
- Author:
- Paul Ferraro
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DoublePredicateA predicate that always returns truestatic final DoublePredicateA predicate that returns true if its parameter is less than zero.static final DoublePredicateA predicate that always returns falsestatic final DoublePredicateA predicate that returns true if its parameter is greater than zero.static final DoublePredicateA predicate that returns true if its parameter is zero. -
Method Summary
Modifier and TypeMethodDescriptiondefault DoublePredicateand(DoublePredicate other) default <V> Predicate<V> compose(ToDoubleFunction<V> function) Returns a predicate that applies the specified function to its argument before evaluating.default DoublePredicatecomposeDouble(DoubleUnaryOperator function) Returns a predicate that applies the specified function to its argument before evaluating.default IntPredicatecomposeInt(IntToDoubleFunction function) Returns a predicate that applies the specified function to its argument before evaluating.default LongPredicatecomposeLong(LongToDoubleFunction function) Returns a predicate that applies the specified function to its argument before evaluating.static DoublePredicateequalTo(double base) Returns a predicate that evaluates to true if and only if the argument is equals to the specified object.static DoublePredicategreaterThan(double base) Returns a predicate that evaluates to true if and only if the argument is equals to the specified object.static DoublePredicatelessThan(double base) Returns a predicate that evaluates to true if and only if the argument is equals to the specified object.default DoublePredicatenegate()static DoublePredicateof(boolean result) Returns a predicate that always evaluates to the specified result.static DoublePredicateof(DoubleConsumer consumer, BooleanSupplier supplier) Returns a predicate that accepts its parameter via the specified consumer and returns the result of the specified supplier.default DoublePredicateor(DoublePredicate other) default DoublePredicatexor(DoublePredicate other) Returns a predicate returning the exclusive disjunction of this predicate with the specified predicate.Methods inherited from interface DoublePredicate
test
-
Field Details
-
ALWAYS
A predicate that always returns true -
NEVER
A predicate that always returns false -
POSITIVE
A predicate that returns true if its parameter is greater than zero. -
ZERO
A predicate that returns true if its parameter is zero. -
NEGATIVE
A predicate that returns true if its parameter is less than zero.
-
-
Method Details
-
compose
Returns a predicate that applies the specified function to its argument before evaluating.- Type Parameters:
V- the mapped type- Parameters:
function- a mapping function- Returns:
- a mapped predicate
-
composeDouble
Returns a predicate that applies the specified function to its argument before evaluating.- Parameters:
function- a mapping operator- Returns:
- a mapped predicate
-
composeInt
Returns a predicate that applies the specified function to its argument before evaluating.- Parameters:
function- a mapping function- Returns:
- a mapped predicate
-
composeLong
Returns a predicate that applies the specified function to its argument before evaluating.- Parameters:
function- a mapping function- Returns:
- a mapped predicate
-
and
- Specified by:
andin interfaceDoublePredicate
-
negate
- Specified by:
negatein interfaceDoublePredicate
-
or
- Specified by:
orin interfaceDoublePredicate
-
xor
Returns a predicate returning the exclusive disjunction of this predicate with the specified predicate.- Parameters:
other- another predicate- Returns:
- a predicate returning the exclusive disjunction of this predicate with the specified predicate.
-
of
Returns a predicate that always evaluates to the specified result.- Parameters:
result- the fixed result- Returns:
- a predicate that always evaluates to the specified value.
-
of
Returns a predicate that accepts its parameter via the specified consumer and returns the result of the specified supplier.- Parameters:
consumer- the predicate parameter consumersupplier- the predicate result supplier- Returns:
- a predicate that accepts its parameter via the specified consumer and returns the result of the specified supplier.
-
lessThan
Returns a predicate that evaluates to true if and only if the argument is equals to the specified object.- Parameters:
base- the comparison value- Returns:
- a predicate that evaluates to true if and only if the argument is equals to the specified object.
-
equalTo
Returns a predicate that evaluates to true if and only if the argument is equals to the specified object.- Parameters:
base- the comparison value- Returns:
- a predicate that evaluates to true if and only if the argument is equals to the specified object.
-
greaterThan
Returns a predicate that evaluates to true if and only if the argument is equals to the specified object.- Parameters:
base- the comparison value- Returns:
- a predicate that evaluates to true if and only if the argument is equals to the specified object.
-