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.default DoublePredicatecompose(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 IntPredicatecompose(IntFunction<T> mapper) Returns a predicate that applies the specified mapping to its argument before evaluating.default LongPredicatecompose(LongFunction<T> mapper) Returns a predicate that applies the specified mapping to its argument before evaluating.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.handle(BiPredicate<T, RuntimeException> handler) Returns a new predicate that delegates to this predicate using the specified exception handler.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> of(boolean result) Returns a predicate that always evaluates to the specified result.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
-
handle
Returns a new predicate that delegates to this predicate using the specified exception handler.- Parameters:
handler- an exception handler- Returns:
- a new predicate that delegates to this predicate using the specified exception handler.
-
compose
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
-
compose
Returns a predicate that applies the specified mapping to its argument before evaluating.- Parameters:
mapper-- Returns:
- a mapped predicate
-
compose
Returns a predicate that applies the specified mapping to its argument before evaluating.- Parameters:
mapper-- Returns:
- a mapped predicate
-
compose
Returns a predicate that applies the specified mapping to its argument before evaluating.- Parameters:
mapper-- Returns:
- a mapped predicate
-
and
-
negate
-
or
-
of
Returns a predicate that always evaluates to the specified result.- Type Parameters:
T- the argument type- Parameters:
result- the fixed result- Returns:
- a predicate that always evaluates to the specified value.
-
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.
-