java.io.Serializable
, Predicate<T>
public final class EqualPredicate<T> extends java.lang.Object implements Predicate<T>, java.io.Serializable
Constructor | Description |
---|---|
EqualPredicate(T object) |
Constructor that performs no validation.
|
EqualPredicate(T object,
Equator<T> equator) |
Constructor that performs no validation.
|
Modifier and Type | Method | 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.
|
java.lang.Object |
getValue() |
Gets the value.
|
public EqualPredicate(T object)
equalPredicate
if you want that.object
- the object to compare topublic 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)
public java.lang.Object getValue()
Copyright © 2001-2019 - Apache Software Foundation