org.clapper.util.io
Class FileOnlyFilter

java.lang.Object
  extended by org.clapper.util.io.FileOnlyFilter
All Implemented Interfaces:
java.io.FileFilter

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

FileOnlyFilter implements a java.io.FileFilter that matches anything that isn't a directory. Note that the following two lines produce semantically equivalent filters:

 FileFilter f1 = new FileOnlyFilter();
 FileFilter f1 = new NotFileFilter (new DirectoryFilter());
 

Version:
$Revision: 5582 $
Author:
Copyright © 2004-2007 Brian M. Clapper

Constructor Summary
FileOnlyFilter()
           
 
Method Summary
 boolean accept(java.io.File f)
          Determine whether the specified file is a directory or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileOnlyFilter

public FileOnlyFilter()
Method Detail

accept

public boolean accept(java.io.File f)
Determine whether the specified file is a directory or not.

Specified by:
accept in interface java.io.FileFilter
Returns:
true if the file is a directory, false if not


Copyright © 2004-2007 Brian M. Clapper. All Rights Reserved.