de.dv.sbu.filefilter.buildin
Class SimplePathFilter

java.lang.Object
  extended by de.dv.sbu.filefilter.buildin.SimplePathFilter
All Implemented Interfaces:
IFileFilter

public class SimplePathFilter
extends java.lang.Object
implements IFileFilter

File filter restricting on relative paths (including the full file name). Wildcard is * (any characters).

Author:
Daniel Vogtland

Constructor Summary
SimplePathFilter()
           
 
Method Summary
 boolean acceptFile(SourceFileInformation fileInfo)
          Test the given file information object relative to some root directory.
 java.lang.String getPattern()
          Returns the path pattern.
 void setPattern(java.lang.String pattern)
          Sets the pattern.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimplePathFilter

public SimplePathFilter()
Method Detail

getPattern

public java.lang.String getPattern()
Returns the path pattern.

Returns:
The current pattern.

setPattern

public void setPattern(java.lang.String pattern)
                throws java.lang.NullPointerException
Sets the pattern. Keep in mind that the path separator is /.

Parameters:
pattern - The pattern to set.
Throws:
java.lang.NullPointerException - The pattern is null.

acceptFile

public boolean acceptFile(SourceFileInformation fileInfo)
Test the given file information object relative to some root directory.

Specified by:
acceptFile in interface IFileFilter
Parameters:
fileInfo - The file information to test.
Returns:
true if the file is accepted. false if the file is rejected.
See Also:
IFileFilter.acceptFile(de.dv.sbu.SourceFileInformation)