Interface Predicate<T>
- Type Parameters:
T
- the argument type
- All Superinterfaces:
Predicate<T>
- All Known Implementing Classes:
Predicate.SimplePredicate
A
Predicate
extension that supports mapping.- 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>
isEqual
(T object) Returns a predicate that evaluates to true if and only if the argument is equals to the specified object.default <V> Predicate<V>
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
-
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.
-
isEqual
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.
-
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
-
and
-
negate
-
or
-