org.apache.commons.collections.functors
Class EqualPredicate
java.lang.Object
org.apache.commons.collections.functors.EqualPredicate
- Predicate, Serializable
public final class EqualPredicate
extends java.lang.Object
Predicate implementation that returns true if the input is the same object
as the one stored in this predicate by equals.
$Revision: 1.5 $ $Date: 2004/05/16 11:16:01 $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
getValue
public Object getValue()
Gets the value.
Copyright © 2001-2006 Apache Software Foundation. All Rights Reserved.