Package org.apache.commons.vfs2.filter
Class NotFileFilter
- java.lang.Object
-
- org.apache.commons.vfs2.filter.NotFileFilter
-
- All Implemented Interfaces:
java.io.Serializable
,FileFilter
public class NotFileFilter extends java.lang.Object implements FileFilter, java.io.Serializable
This filter produces a logical NOT of the filters specified.- Since:
- 2.4
- See Also:
- "http://commons.apache.org/proper/commons-io/", Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private FileFilter
filter
The filter.private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description NotFileFilter(FileFilter filter)
Constructs a new file filter that NOTs the result of another filter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
accept(FileSelectInfo fileSelectInfo)
Returns the logical NOT of the underlying filter's return value for the same File.java.lang.String
toString()
Provide a String representation of this file filter.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
filter
private final FileFilter filter
The filter.
-
-
Constructor Detail
-
NotFileFilter
public NotFileFilter(FileFilter filter)
Constructs a new file filter that NOTs the result of another filter.- Parameters:
filter
- the filter, must not be null
-
-
Method Detail
-
accept
public boolean accept(FileSelectInfo fileSelectInfo) throws FileSystemException
Returns the logical NOT of the underlying filter's return value for the same File.- Specified by:
accept
in interfaceFileFilter
- Parameters:
fileSelectInfo
- the File to check- Returns:
true
if the filter returnsfalse
- Throws:
FileSystemException
- Thrown for file system errors.
-
toString
public java.lang.String toString()
Provide a String representation of this file filter.- Overrides:
toString
in classjava.lang.Object
- Returns:
- a String representation
-
-