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

public Class NotFileFilter

extends AbstractFileFilter
Class Inheritance
Imports
java.io.File

This filter produces a logical NOT of the filters specified.
Author
Stephen Colebourne
Since
Commons IO 1.0
Version
$Revision: 437567 $ $Date: 2006-08-28 08:39:07 +0200 (Mo, 28 Aug 2006) $

Field Summary

Modifier and TypeField and Description
private IOFileFilter
filter

The filter

Constructor Summary

AccessConstructor and Description
public
NotFileFilter(IOFileFilter
the filter, must not be null
filter
)

Constructs a new file filter that NOTs the result of another filters.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if the filter returns false
accept
(File
the File to check
file
)

Overrides org.apache.commons.io.filefilter.AbstractFileFilter.accept.

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

Checks to see if both filters are true.
public boolean

Returns:

true if the filter returns false
accept
(File
the File directory
file
,
String
the filename
name
)

Overrides org.apache.commons.io.filefilter.AbstractFileFilter.accept.

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

Checks to see if both filters are true.

Field Detail

filterback to summary
private IOFileFilter filter

The filter

Constructor Detail

NotFileFilterback to summary
public NotFileFilter(IOFileFilter filter)

Constructs a new file filter that NOTs the result of another filters.

Parameters
filter:IOFileFilter

the filter, must not be null

Exceptions
IllegalArgumentException:
if the filter is null

Method Detail

acceptback to summary
public boolean accept(File file)

Overrides org.apache.commons.io.filefilter.AbstractFileFilter.accept.

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

Checks to see if both filters are true.

Parameters
file:File

the File to check

Returns:boolean

true if the filter returns false

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

Overrides org.apache.commons.io.filefilter.AbstractFileFilter.accept.

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

Checks to see if both filters are true.

Parameters
file:File

the File directory

name:String

the filename

Returns:boolean

true if the filter returns false