Top Description Constructors Methods
org.apache.commons.io.filefilter

public abstract Class AbstractFileFilter

extends Object
implements IOFileFilter
Class Inheritance
All Implemented Interfaces
org.apache.commons.io.filefilter.IOFileFilter, java.io.FilenameFilter, java.io.FileFilter
Known Direct Subclasses
org.apache.commons.io.filefilter.AgeFileFilter, org.apache.commons.io.filefilter.AndFileFilter, org.apache.commons.io.filefilter.CanReadFileFilter, org.apache.commons.io.filefilter.CanWriteFileFilter, org.apache.commons.io.filefilter.DelegateFileFilter, org.apache.commons.io.filefilter.DirectoryFileFilter, org.apache.commons.io.filefilter.EmptyFileFilter, org.apache.commons.io.filefilter.FileFileFilter, org.apache.commons.io.filefilter.HiddenFileFilter, org.apache.commons.io.filefilter.NameFileFilter, org.apache.commons.io.filefilter.NotFileFilter, org.apache.commons.io.filefilter.OrFileFilter, org.apache.commons.io.filefilter.PrefixFileFilter, org.apache.commons.io.filefilter.SizeFileFilter, org.apache.commons.io.filefilter.SuffixFileFilter, org.apache.commons.io.filefilter.WildcardFileFilter, org.apache.commons.io.filefilter.WildcardFilter
Imports
java.io.File

An abstract class which implements the Java FileFilter and FilenameFilter interfaces via the IOFileFilter interface.

Note that a subclass must override one of the accept methods, otherwise your class will infinitely loop.

Author
Stephen Colebourne
Since
Commons IO 1.0
Version
$Revision: 471628 $ $Date: 2006-11-06 05:06:45 +0100 (Mo, 06 Nov 2006) $

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if this file matches the test
accept
(File
the File to check
file
)

Implements org.apache.commons.io.filefilter.IOFileFilter.accept.

Checks to see if the File should be accepted by this filter.
public boolean

Returns:

true if this file matches the test
accept
(File
the directory File to check
dir
,
String
the filename within the directory to check
name
)

Implements org.apache.commons.io.filefilter.IOFileFilter.accept.

Checks to see if the File should be accepted by this filter.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

AbstractFileFilterback to summary
public AbstractFileFilter()

Method Detail

acceptback to summary
public boolean accept(File file)

Implements org.apache.commons.io.filefilter.IOFileFilter.accept.

Checks to see if the File should be accepted by this filter.

Parameters
file:File

the File to check

Returns:boolean

true if this file matches the test

acceptback to summary
public boolean accept(File dir, String name)

Implements org.apache.commons.io.filefilter.IOFileFilter.accept.

Checks to see if the File should be accepted by this filter.

Parameters
dir:File

the directory File to check

name:String

the filename within the directory to check

Returns:boolean

true if this file matches the test