org.apache.commons.collections.functors
Class IdentityPredicate
java.lang.Object
org.apache.commons.collections.functors.IdentityPredicate
- Predicate, Serializable
public final class IdentityPredicate
extends java.lang.Object
Predicate implementation that returns true if the input is the same object
as the one stored in this predicate.
$Revision: 1.5 $ $Date: 2004/05/16 11:16:01 $
boolean | evaluate(Object object) - Evaluates the predicate returning true if the input object is identical to
the stored object.
|
static Predicate | getInstance(Object object) - Factory to create the identity predicate.
|
Object | getValue() - Gets the value.
|
IdentityPredicate
public IdentityPredicate(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 object is identical to
the stored object.
- evaluate in interface Predicate
object
- the input object
- true if input is the same object as the 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.