CoherenceTM v3.3
Copyright© 2000-2007 by Oracle Corporation

com.tangosol.util
Class ClassFilter

java.lang.Object
  extended by com.tangosol.util.Base
      extended by com.tangosol.util.ClassFilter
All Implemented Interfaces:
Filter

public class ClassFilter
extends Base
implements Filter

Filter which discards all objects that are not of a certain class.

Author:
cp 1999.08.26

Constructor Summary
ClassFilter(Class clz)
          Constructor.
 
Method Summary
 boolean equals(Object o)
          Compare the ClassFilter with another object to determine equality.
 boolean evaluate(Object o)
          Filter interface: evaluate().
 int hashCode()
          Determine a hash value for the ClassFilter object according to the general Object.hashCode() contract.
 String toString()
          Return a human-readable description for this Filter.
 

Constructor Detail

ClassFilter

public ClassFilter(Class clz)
Constructor.

Method Detail

evaluate

public boolean evaluate(Object o)
Filter interface: evaluate().

Specified by:
evaluate in interface Filter
Returns:
true if the test passes, false otherwise

equals

public boolean equals(Object o)
Compare the ClassFilter with another object to determine equality.

Returns:
true iff this ClassFilter and the passed object are equivalent ClassFilters

hashCode

public int hashCode()
Determine a hash value for the ClassFilter object according to the general Object.hashCode() contract.

Returns:
an integer hash value for this ClassFilter object

toString

public String toString()
Return a human-readable description for this Filter.

Returns:
a String description of the Filter

CoherenceTM v3.3
Copyright© 2000-2007 by Oracle Corporation