org.easycsv.filter
Class PatternLineFilter

java.lang.Object
  extended by org.easycsv.filter.PatternLineFilter
All Implemented Interfaces:
LineFilter

public class PatternLineFilter
extends java.lang.Object
implements LineFilter

A line filter that filters out lines based on a regular expression.

Version:
$LastChangedRevision:12 $
Author:
Oliver J. Siegmar

Constructor Summary
PatternLineFilter(java.util.regex.Pattern pattern)
          Constructs this line filter with the specified pattern.
PatternLineFilter(java.lang.String pattern)
          Constructs this line filter with the specified pattern.
 
Method Summary
 boolean accept(java.lang.String line)
          Tests whether or not the specified line should be read into the CsvDataStore.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PatternLineFilter

public PatternLineFilter(java.util.regex.Pattern pattern)
Constructs this line filter with the specified pattern.

Parameters:
pattern - The regular expression pattern to be used for filtering

PatternLineFilter

public PatternLineFilter(java.lang.String pattern)
Constructs this line filter with the specified pattern.

Parameters:
pattern - The regular expression pattern string to be used for filtering
Method Detail

accept

public boolean accept(java.lang.String line)
Tests whether or not the specified line should be read into the CsvDataStore.

Specified by:
accept in interface LineFilter
Parameters:
line - The CSV line to be tested
Returns:
true if and only if line matches the regular expression


Copyright 2005-2005-2006 null. All Rights Reserved.