com.phoenixst.collections

Class IdentityPredicate

public final class IdentityPredicate extends Object implements Predicate, Serializable

A Predicate which simply tests the evaluate( object ) argument for reference equality with a specified object.

This is mostly equivalent to the class of the same name in Jakarta Commons-Collections 3.0, except that it exposes the test object used in the constructor. No equivalent exists in version 2.1.

Since: 1.0

Version: $Revision: 1.7 $

Author: Ray A. Conner

Constructor Summary
IdentityPredicate(Object testObject)
Creates a new IdentityPredicate with the specified test object.
Method Summary
booleanequals(Object object)
booleanevaluate(Object object)
ObjectgetTestObject()
Returns the test object being used by this IdentityPredicate.
inthashCode()
StringtoString()

Constructor Detail

IdentityPredicate

public IdentityPredicate(Object testObject)
Creates a new IdentityPredicate with the specified test object.

Method Detail

equals

public boolean equals(Object object)

evaluate

public boolean evaluate(Object object)

getTestObject

public Object getTestObject()
Returns the test object being used by this IdentityPredicate.

hashCode

public int hashCode()

toString

public String toString()
See the Plexus project home, hosted by SourceForge.
Copyright B) 1994-2006, by Phoenix Software Technologists, Inc. and others. All Rights Reserved. Use is subject to license terms.