|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.collections4.functors.EqualPredicate<T>
public final class EqualPredicate<T>
Predicate implementation that returns true if the input is the same object as the one stored in this predicate by equals.
Constructor Summary | |
---|---|
EqualPredicate(T object)
Constructor that performs no validation. |
|
EqualPredicate(T object,
Equator<T> equator)
Constructor that performs no validation. |
Method Summary | ||
---|---|---|
static
|
equalPredicate(T object)
Factory to create the predicate. |
|
static
|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
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 comparisonMethod Detail |
---|
public static <T> Predicate<T> equalPredicate(T object)
T
- the type that the predicate queriesobject
- the object to compare to
IllegalArgumentException
- if the predicate is nullpublic 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 comparison
IllegalArgumentException
- if the predicate is nullpublic boolean evaluate(T object)
evaluate
in interface Predicate<T>
object
- the input object
public Object getValue()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |