java.io.FileFilter
, java.io.FilenameFilter
, java.io.Serializable
, IOFileFilter
public class NotFileFilter extends AbstractFileFilter implements java.io.Serializable
FileFilterUtils.notFileFilter(IOFileFilter)
,
Serialized FormModifier and Type | Field | Description |
---|---|---|
private IOFileFilter |
filter |
The filter
|
Constructor | Description |
---|---|
NotFileFilter(IOFileFilter filter) |
Constructs a new file filter that NOTs the result of another filter.
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
accept(java.io.File file) |
Returns the logical NOT of the underlying filter's return value for the same File.
|
boolean |
accept(java.io.File file,
java.lang.String name) |
Returns the logical NOT of the underlying filter's return value for the same arguments.
|
java.lang.String |
toString() |
Provide a String representaion of this file filter.
|
private final IOFileFilter filter
public NotFileFilter(IOFileFilter filter)
filter
- the filter, must not be nulljava.lang.IllegalArgumentException
- if the filter is nullpublic boolean accept(java.io.File file)
accept
in interface java.io.FileFilter
accept
in interface IOFileFilter
accept
in class AbstractFileFilter
file
- the File to checkpublic boolean accept(java.io.File file, java.lang.String name)
accept
in interface java.io.FilenameFilter
accept
in interface IOFileFilter
accept
in class AbstractFileFilter
file
- the File directoryname
- the filenamepublic java.lang.String toString()
toString
in class AbstractFileFilter
Copyright (c) 2002-2017 Apache Software Foundation