com.townleyenterprises.filter
Class StringFilter

java.lang.Object
  extended bycom.townleyenterprises.common.PropertyProxy
      extended bycom.townleyenterprises.filter.QueryFilter
          extended bycom.townleyenterprises.filter.StringFilter
All Implemented Interfaces:
Filter, java.io.Serializable
Direct Known Subclasses:
SubstringFilter

public class StringFilter
extends QueryFilter

This is a specialized instance of the QueryFilter class which directly supports filtering Strings. It will perform case sensitive or case insensitive string comparisons with the target objects, depending on how the object is configured when it is created.

Since:
2.0
Version:
$Id: StringFilter.java,v 1.3 2004/07/28 10:33:58 atownley Exp $
Author:
Andrew S. Townley
See Also:
Serialized Form

Constructor Summary
StringFilter(java.lang.Class klass, java.lang.String property, java.lang.String value, boolean ignorecase)
          The constructor takes the property and the string value which should be compared.
 
Method Summary
 boolean doFilter(java.lang.Object o)
          This method actually performs the operation that will determine if the parameter object should be included in the "result" or not.
 boolean getIgnoreCase()
           
 
Methods inherited from class com.townleyenterprises.filter.QueryFilter
getOperator, getOperatorString, getProperty, getValue, toString
 
Methods inherited from class com.townleyenterprises.common.PropertyProxy
getPropertyValue, getSubjectClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StringFilter

public StringFilter(java.lang.Class klass,
                    java.lang.String property,
                    java.lang.String value,
                    boolean ignorecase)
The constructor takes the property and the string value which should be compared.

Parameters:
klass - the class of the object to be filtered
property - the property name
value - the string value
ignorecase - controls case sensitivity of the comparison operation
Method Detail

doFilter

public boolean doFilter(java.lang.Object o)
Description copied from interface: Filter
This method actually performs the operation that will determine if the parameter object should be included in the "result" or not.

Specified by:
doFilter in interface Filter
Overrides:
doFilter in class QueryFilter

getIgnoreCase

public boolean getIgnoreCase()


Copyright © 2002-2004, Andrew S. Townley and Townley Enterprises. All Rights Reserved.
This project is hosted on http://te-code.sourceforge.net.