org.sadun.util
Class DirectoryFileFilter

java.lang.Object
  extended byorg.sadun.util.DirectoryFileFilter
All Implemented Interfaces:
java.io.FileFilter

public class DirectoryFileFilter
extends java.lang.Object
implements java.io.FileFilter

A FileFilter to filter in or out directories.

Author:
Cristiano Sadun

Constructor Summary
DirectoryFileFilter()
          Create a DirectoryFileFilter which accepts only directories.
DirectoryFileFilter(boolean doAccept)
          Constructor for DirectoryFileFilter.
 
Method Summary
 boolean accept(java.io.File pathname)
          Accepts or refuses directores depending on the construction parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectoryFileFilter

public DirectoryFileFilter(boolean doAccept)
Constructor for DirectoryFileFilter.

Parameters:
doAccept - if true directories are accepted, otherwise refused.

DirectoryFileFilter

public DirectoryFileFilter()
Create a DirectoryFileFilter which accepts only directories.

Method Detail

accept

public boolean accept(java.io.File pathname)
Accepts or refuses directores depending on the construction parameters.

Specified by:
accept in interface java.io.FileFilter
See Also:
FileFilter.accept(File)