public final class EqualPredicate<T> extends Object implements Predicate<T>, Serializable
Constructor and Description |
---|
EqualPredicate(T object)
Constructor that performs no validation.
|
EqualPredicate(T object,
Equator<T> equator)
Constructor that performs no validation.
|
Modifier and Type | Method and Description |
---|---|
static <T> Predicate<T> |
equalPredicate(T object)
Factory to create the predicate.
|
static <T> Predicate<T> |
equalPredicate(T object,
Equator<T> equator)
Factory to create the identity predicate.
|
boolean |
evaluate(T object)
Evaluates the predicate returning true if the input equals the stored value.
|
Object |
getValue()
Gets the value.
|
public EqualPredicate(T object)
equalPredicate
if you want that.object
- the object to compare topublic EqualPredicate(T object, Equator<T> equator)
equalPredicate
if you want that.object
- the object to compare toequator
- the equator to use for comparisonpublic static <T> Predicate<T> equalPredicate(T object)
T
- the type that the predicate queriesobject
- the object to compare topublic static <T> Predicate<T> equalPredicate(T object, Equator<T> equator)
T
- the type that the predicate queriesobject
- the object to compare toequator
- the equator to use for comparisonpublic boolean evaluate(T object)
Copyright © 2001–2019 The Apache Software Foundation. All rights reserved.