org.apache.commons.collections.functors
Class EqualPredicate
- Predicate, Serializable
public final class EqualPredicate
Predicate implementation that returns true if the input is the same object
as the one stored in this predicate by equals.
Version:
- Stephen Colebourne
- Commons Collections 3.0
EqualPredicate(Object object) - Constructor that performs no validation.
|
boolean | evaluate(Object object) - Evaluates the predicate returning true if the input equals the stored value.
|
static Predicate | getInstance(Object object) - Factory to create the identity predicate.
|
Object | getValue() - Gets the value.
|
EqualPredicate
public EqualPredicate(Object object)
Constructor that performs no validation.
Use getInstance
if you want that.
object
- the object to compare to
evaluate
public boolean evaluate(Object object)
Evaluates the predicate returning true if the input equals the stored value.
- evaluate in interface Predicate
object
- the input object
- true if input object equals stored value
getInstance
public static Predicate getInstance(Object object)
Factory to create the identity predicate.
object
- the object to compare to
- the predicate
getValue
public Object getValue()
Gets the value.
- the value
- Commons Collections 3.1
Copyright © 2001-2005 Apache Software Foundation. All Rights Reserved.