org.apache.commons.io.filefilter

Class NotFileFilter

public class NotFileFilter extends AbstractFileFilter

This filter produces a logical NOT of the filters specified.

Since: Commons IO 1.0

Version: $Revision: 437567 $ $Date: 2006-08-28 08:39:07 +0200 (Mo, 28 Aug 2006) $

Author: Stephen Colebourne

Field Summary
IOFileFilterfilter
The filter
Constructor Summary
NotFileFilter(IOFileFilter filter)
Constructs a new file filter that NOTs the result of another filters.
Method Summary
booleanaccept(File file)
Checks to see if both filters are true.
booleanaccept(File file, String name)
Checks to see if both filters are true.

Field Detail

filter

private IOFileFilter filter
The filter

Constructor Detail

NotFileFilter

public NotFileFilter(IOFileFilter filter)
Constructs a new file filter that NOTs the result of another filters.

Parameters: filter the filter, must not be null

Throws: IllegalArgumentException if the filter is null

Method Detail

accept

public boolean accept(File file)
Checks to see if both filters are true.

Parameters: file the File to check

Returns: true if the filter returns false

accept

public boolean accept(File file, String name)
Checks to see if both filters are true.

Parameters: file the File directory name the filename

Returns: true if the filter returns false