public final class EqualPredicate<T> extends Objectimplements Predicate <T>, Serializable
| Constructor and Description |
|---|
EqualPredicate(T object)
Constructor that performs no validation.
|
EqualPredicate(T object, Equator
Constructor that performs no validation.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> Predicate |
equalPredicate(T object)
Factory to create the predicate.
|
static <T> Predicate |
equalPredicate(T object, 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 to
public static <T> Predicate<T> equalPredicate(T object)
T - the type that the predicate queries
object - the object to compare to
public static <T> Predicate<T> equalPredicate(T object, Equator <T> equator)
T - the type that the predicate queries
object - the object to compare to
equator - the equator to use for comparison
public boolean evaluate(T object)
public ObjectgetValue()