Interface LongPredicate
- All Superinterfaces:
LongPredicate
An enhanced long predicate.
- Author:
- Paul Ferraro
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final LongPredicateA predicate that always returns truestatic final LongPredicateA predicate that returns true if its parameter is less than zero.static final LongPredicateA predicate that always returns falsestatic final LongPredicateA predicate that returns true if its parameter is greater than zero.static final LongPredicateA predicate that returns true if its parameter is zero. -
Method Summary
Modifier and TypeMethodDescriptiondefault LongPredicateand(LongPredicate other) default <V> Predicate<V> compose(ToLongFunction<V> function) Returns a predicate that applies the specified function to its argument before evaluating.default DoublePredicatecomposeDouble(DoubleToLongFunction function) Returns a predicate that applies the specified function to its argument before evaluating.default IntPredicatecomposeInt(IntToLongFunction function) Returns a predicate that applies the specified function to its argument before evaluating.default LongPredicatecomposeLong(LongUnaryOperator function) Returns a predicate that applies the specified function to its argument before evaluating.static LongPredicateequalTo(long base) Returns a predicate that evaluates to true if and only if the argument is equals to the specified object.static LongPredicategreaterThan(long base) Returns a predicate that evaluates to true if and only if the argument is equals to the specified object.static LongPredicatelessThan(long base) Returns a predicate that evaluates to true if and only if the argument is equals to the specified object.default LongPredicatenegate()static LongPredicateof(boolean result) Returns a predicate that always evaluates to the specified result.static LongPredicateof(LongConsumer consumer, BooleanSupplier supplier) Returns a predicate that accepts its parameter via the specified consumer and returns the result of the specified supplier.default LongPredicateor(LongPredicate other) default LongPredicatexor(LongPredicate other) Returns a predicate returning the exclusive disjunction of this predicate with the specified predicate.Methods inherited from interface LongPredicate
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 function- 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 interfaceLongPredicate
-
negate
- Specified by:
negatein interfaceLongPredicate
-
or
- Specified by:
orin interfaceLongPredicate
-
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.
-