Package org.wildfly.clustering.function
Interface Predicate<T>
- Type Parameters:
T- the argument type
- All Superinterfaces:
Predicate<T>
- All Known Implementing Classes:
Predicate.SimplePredicate
An enhanced predicate.
- Author:
- Paul Ferraro
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Predicate<T>always()Returns a predicate that always accepts its argument.static <T> Predicate<T>equal(T object) Returns a predicate that evaluates to true if and only if the argument is equals to the specified object.default DoublePredicatemap(DoubleFunction<T> mapper) Returns a predicate that applies the specified mapping to its argument before evaluating.default <V> Predicate<V>Returns a predicate that applies the specified mapping to its argument before evaluating.default IntPredicatemap(IntFunction<T> mapper) Returns a predicate that applies the specified mapping to its argument before evaluating.default LongPredicatemap(LongFunction<T> mapper) Returns a predicate that applies the specified mapping to its argument before evaluating.negate()static <T> Predicate<T>never()Returns a predicate that never accepts its argument.static <T> Predicate<T>Returns a predicate that evaluates to the negation of the specified predicate.static <T> Predicate<T>same(T object) Returns a predicate that evaluates to true if and only if the argument references the specified object.
-
Field Details
-
ALWAYS
-
NEVER
-
-
Method Details
-
map
Returns a predicate that applies the specified mapping to its argument before evaluating.- Type Parameters:
V- the mapped type- Parameters:
mapper-- Returns:
- a mapped predicate
-
map
Returns a predicate that applies the specified mapping to its argument before evaluating.- Parameters:
mapper-- Returns:
- a mapped predicate
-
map
Returns a predicate that applies the specified mapping to its argument before evaluating.- Parameters:
mapper-- Returns:
- a mapped predicate
-
map
Returns a predicate that applies the specified mapping to its argument before evaluating.- Parameters:
mapper-- Returns:
- a mapped predicate
-
and
-
negate
-
or
-
always
Returns a predicate that always accepts its argument.- Type Parameters:
T- the argument type- Returns:
- a predicate that always accepts its argument.
-
never
Returns a predicate that never accepts its argument.- Type Parameters:
T- the argument type- Returns:
- a predicate that never accepts its argument.
-
equal
Returns a predicate that evaluates to true if and only if the argument is equals to the specified object.- Type Parameters:
T- the argument type- Parameters:
object- the object whose reference must match the predicate argument- Returns:
- a predicate that evaluates to true if and only if the argument is equals to the specified object.
-
same
Returns a predicate that evaluates to true if and only if the argument references the specified object.- Type Parameters:
T- the argument type- Parameters:
object- the object whose reference must match the predicate argument- Returns:
- a predicate that evaluates to true if and only if the argument references the specified object.
-
not
Returns a predicate that evaluates to the negation of the specified predicate.- Type Parameters:
T- the argument type- Parameters:
predicate- the predicate to negate- Returns:
- a predicate that evaluates to the negation of the specified predicate.
-