org.apache.ecs.filter
Class StringFilter
java.lang.Object
|
+--org.apache.ecs.storage.Hash
|
+--org.apache.ecs.filter.StringFilter
- public class StringFilter
- extends Hash
- implements Filter
Stupid implementation of Filter interface to demonstrate how easy
it is to create your own filters. This should NOT be used in/for
anything real. Anyone want to implement a regex filter?
- Version:
- $Id: StringFilter.java,v 1.2 1999/10/09 06:49:55 stephan Exp $
- Author:
- Stephan Nagy, Jon S. Stevens
- See Also:
- Serialized Form
Method Summary |
Filter |
addAttribute(java.lang.String attribute,
java.lang.Object entity)
Put a filter somewhere we can get to it. |
java.lang.String |
getInfo()
Returns the name of the filter |
boolean |
hasAttribute(java.lang.String attribute)
Does the filter filter this? |
java.lang.String |
process(java.lang.String to_process)
this method actually performs the filtering. |
Filter |
removeAttribute(java.lang.String attribute)
Get rid of a current filter. |
private java.lang.String[] |
split(java.lang.String to_split)
Need a way to parse the stream so we can do string comparisons instead
of character comparisons. |
Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
StringFilter
public StringFilter()
getInfo
public java.lang.String getInfo()
- Returns the name of the filter
- Specified by:
- getInfo in interface Filter
process
public java.lang.String process(java.lang.String to_process)
- this method actually performs the filtering.
- Specified by:
- process in interface Filter
addAttribute
public Filter addAttribute(java.lang.String attribute,
java.lang.Object entity)
- Put a filter somewhere we can get to it.
- Specified by:
- addAttribute in interface Filter
removeAttribute
public Filter removeAttribute(java.lang.String attribute)
- Get rid of a current filter.
- Specified by:
- removeAttribute in interface Filter
hasAttribute
public boolean hasAttribute(java.lang.String attribute)
- Does the filter filter this?
- Specified by:
- hasAttribute in interface Filter
split
private java.lang.String[] split(java.lang.String to_split)
- Need a way to parse the stream so we can do string comparisons instead
of character comparisons.