org.apache.commons.io.filefilter
Class NotFileFilter
java.lang.Object
|
+--org.apache.commons.io.filefilter.AbstractFileFilter
|
+--org.apache.commons.io.filefilter.NotFileFilter
- All Implemented Interfaces:
- FileFilter, FilenameFilter, IOFileFilter
- 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-27 23:39:07 -0700 (Sun, 27 Aug 2006) $
- Author:
- Stephen Colebourne
Method Summary |
boolean |
accept(File file)
Checks to see if both filters are true. |
boolean |
accept(File file,
String name)
Checks to see if both filters are true. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
filter
private IOFileFilter filter
- The filter
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
accept
public boolean accept(File file)
- Checks to see if both filters are true.
- Overrides:
accept
in class AbstractFileFilter
- 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.
- Overrides:
accept
in class AbstractFileFilter
- Parameters:
file
- the File directoryname
- the filename- Returns:
- true if the filter returns false