public class NotFileFilter extends AbstractFileFilter implements java.io.Serializable
Serialization is deprecated and will be removed in 3.0.
FileFilterUtils.notFileFilter(IOFileFilter),
Serialized Form| Modifier and Type | Field and Description |
|---|---|
private IOFileFilter |
filter
The filter
|
private static long |
serialVersionUID |
EMPTY_STRING_ARRAY| Constructor and Description |
|---|
NotFileFilter(IOFileFilter filter)
Constructs a new file filter that NOTs the result of another filter.
|
| Modifier and Type | Method and 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.nio.file.FileVisitResult |
accept(java.nio.file.Path file,
java.nio.file.attribute.BasicFileAttributes attributes)
Returns the logical NOT of the underlying filter's return value for the same File.
|
private java.nio.file.FileVisitResult |
not(java.nio.file.FileVisitResult accept) |
java.lang.String |
toString()
Provide a String representation of this file filter.
|
append, append, get, handle, postVisitDirectory, preVisitDirectory, toDefaultFileVisitResult, toFileVisitResult, visitFile, visitFileFailedclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitand, matches, negate, orprivate static final long serialVersionUID
private final IOFileFilter filter
public NotFileFilter(IOFileFilter filter)
filter - the filter, must not be nulljava.lang.NullPointerException - if the filter is nullpublic boolean accept(java.io.File file)
accept in interface java.io.FileFilteraccept in interface IOFileFilteraccept in class AbstractFileFilterfile - the File to checkpublic boolean accept(java.io.File file,
java.lang.String name)
accept in interface java.io.FilenameFilteraccept in interface IOFileFilteraccept in class AbstractFileFilterfile - the File directoryname - the file namepublic java.nio.file.FileVisitResult accept(java.nio.file.Path file,
java.nio.file.attribute.BasicFileAttributes attributes)
accept in interface PathFilteraccept in interface IOFileFilterfile - the File to checkattributes - the file's basic attributes (TODO may be null).private java.nio.file.FileVisitResult not(java.nio.file.FileVisitResult accept)
public java.lang.String toString()
toString in class AbstractFileFilter