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
- Author:
- This code was originally ported from Apache Commons IO File Filter
- See Also:
- "https://commons.apache.org/proper/commons-io/", Serialized Form
-
-
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 booleanaccept(FileSelectInfo fileSelectInfo)Returns the logical NOT of the underlying filter's return value for the same File.java.lang.StringtoString()Provide a String representation of this file 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:
acceptin interfaceFileFilter- Parameters:
fileSelectInfo- the File to check- Returns:
trueif 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:
toStringin classjava.lang.Object- Returns:
- a String representation
-
-