com.autonomy.utilities
Class WildFilter

java.lang.Object
  |
  +--com.autonomy.utilities.WildFilter
All Implemented Interfaces:
java.io.FilenameFilter

public class WildFilter
extends java.lang.Object
implements java.io.FilenameFilter

Implmentation of the FilenameFilter interface that uses standard * wildcards to isolate files. The additional 'Not' flag can isolate files that do not match the filter.


Constructor Summary
WildFilter()
          Default constructor
WildFilter(java.lang.String sFilter, boolean bNot)
          Constructor
 
Method Summary
 boolean accept(java.io.File dir, java.lang.String name)
          Implementation of the accept method specified by FilenameFilter
 void setFilter(java.lang.String sFilter, boolean bNot)
          Set the filter
 void setNot(boolean bNot)
          Set the 'not' flag
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WildFilter

public WildFilter()
Default constructor


WildFilter

public WildFilter(java.lang.String sFilter,
                  boolean bNot)
Constructor

Parameters:
sFilter - Wildcard match used for this filter e.g. *.txt
bNot - If true, only returns filenames that do not match the given filter
Method Detail

setFilter

public void setFilter(java.lang.String sFilter,
                      boolean bNot)
Set the filter

Parameters:
sFilter - Wildcard match used for this filter e.g. *.txt

setNot

public void setNot(boolean bNot)
Set the 'not' flag

Parameters:
bNot - If true, returns only files that do not match the filter

accept

public boolean accept(java.io.File dir,
                      java.lang.String name)
Implementation of the accept method specified by FilenameFilter

Specified by:
accept in interface java.io.FilenameFilter
See Also:
FilenameFilter