org.apache.commons.collections.functors
Class IdentityPredicate
java.lang.Objectorg.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: 348444 $ $Date: 2005-11-23 14:06:56 +0000 (Wed, 23 Nov 2005) $
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-2015 Apache Software Foundation. All Rights Reserved.