org.jppf.doc
Class AbstractFileFilter

java.lang.Object
  extended by org.jppf.doc.AbstractFileFilter
All Implemented Interfaces:
FileFilter
Direct Known Subclasses:
JPPFDirFilter, JPPFFileFilter

public abstract class AbstractFileFilter
extends Object
implements FileFilter

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
protected  String[] excludes
          Excluded names.
protected  String[] includes
          Included names.
 
Constructor Summary
AbstractFileFilter()
          Initialize a filter accepting all names.
 
Method Summary
protected  boolean excluded(String name, boolean ignoreCase)
          Check whether the specified name is excluded by this filter.
protected  boolean included(String name, boolean ignoreCase)
          Check whether the specified name is included by this filter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.io.FileFilter
accept
 

Field Detail

includes

protected String[] includes
Included names. If specified, only these directories will be included.


excludes

protected String[] excludes
Excluded names. If specified, only these directories will be excluded.

Constructor Detail

AbstractFileFilter

public AbstractFileFilter()
Initialize a filter accepting all names.

Method Detail

included

protected boolean included(String name,
                           boolean ignoreCase)
Check whether the specified name is included by this filter.

Parameters:
name - the name to check.
ignoreCase - determines whether name comparisons should ignore case.
Returns:
true if the name is included, false otherwise.

excluded

protected boolean excluded(String name,
                           boolean ignoreCase)
Check whether the specified name is excluded by this filter.

Parameters:
name - the name to check.
ignoreCase - determines whether name comparisons should ignore case.
Returns:
true if the name is excluded, false otherwise.


Copyright © 2005-2010 JPPF Team.