org.jppf.doc
Class JPPFDirFilter

java.lang.Object
  extended by org.jppf.doc.AbstractFileFilter
      extended by org.jppf.doc.JPPFDirFilter
All Implemented Interfaces:
FileFilter

public class JPPFDirFilter
extends AbstractFileFilter

Filter that only accepts directories. It is possible to include or excluded specific directory names, in which case the including filter is applied before the excluding one.


Field Summary
 
Fields inherited from class org.jppf.doc.AbstractFileFilter
excludes, includes
 
Constructor Summary
JPPFDirFilter()
          Initialize a filter accepting all directory names except those excluded by default.
JPPFDirFilter(String[] includes)
          Initialize a filter accepting the specified directory names and excluding those specified by DEFAULT_EXCLUDES.
JPPFDirFilter(String[] includes, String[] excludes)
          Initialize a filter accepting the specified directory names and excluding the specifiied ones.
 
Method Summary
 boolean accept(File path)
          Determine if a file is accepted.
 
Methods inherited from class org.jppf.doc.AbstractFileFilter
excluded, included
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JPPFDirFilter

public JPPFDirFilter()
Initialize a filter accepting all directory names except those excluded by default.


JPPFDirFilter

public JPPFDirFilter(String[] includes)
Initialize a filter accepting the specified directory names and excluding those specified by DEFAULT_EXCLUDES.

Parameters:
includes - the included directory names; if null all are included. Null values are ignored.

JPPFDirFilter

public JPPFDirFilter(String[] includes,
                     String[] excludes)
Initialize a filter accepting the specified directory names and excluding the specifiied ones.

Parameters:
includes - the included directory names; if null all are included. Null values are ignored.
excludes - the excluded directory names; if null none are excluded. Null values are ignored.
Method Detail

accept

public boolean accept(File path)
Determine if a file is accepted.

Parameters:
path - the file path to check.
Returns:
true if the file is a directory, false otherwise.
See Also:
FileFilter.accept(java.io.File)


Copyright © 2005-2010 JPPF Team.