edu.northwestern.at.utils
Class RegExpCollectionFilter

java.lang.Object
  extended by edu.northwestern.at.utils.RegExpCollectionFilter

public class RegExpCollectionFilter
extends java.lang.Object

Filters a String collection using a regular expression.


Field Summary
protected  java.lang.String sourcePattern
          Source pattern string.
protected  java.util.regex.Matcher sourcePatternMatcher
          Compiled source pattern matcher.
 
Constructor Summary
RegExpCollectionFilter(java.lang.String sourcePattern)
          Create a filter definition.
 
Method Summary
 java.util.Collection filter(java.util.Collection collection)
          Filter a string collection using the pattern..
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sourcePattern

protected java.lang.String sourcePattern
Source pattern string.


sourcePatternMatcher

protected java.util.regex.Matcher sourcePatternMatcher
Compiled source pattern matcher.

Constructor Detail

RegExpCollectionFilter

public RegExpCollectionFilter(java.lang.String sourcePattern)
Create a filter definition.

Parameters:
sourcePattern - Source pattern string as a regular expression.
Method Detail

filter

public java.util.Collection filter(java.util.Collection collection)
Filter a string collection using the pattern..

Parameters:
collection - String collection to filter.
Returns:
Filtered collection with string matching pattern removed.