Package 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,Serializable,IOFileFilter
This filter produces a logical NOT of the filters specified.
- Since:
- 1.0
- See Also:
-
Field Summary
FieldsFields inherited from interface org.apache.commons.io.filefilter.IOFileFilter
EMPTY_STRING_ARRAY -
Constructor Summary
ConstructorsConstructorDescriptionNotFileFilter(IOFileFilter filter) Constructs a new file filter that NOTs the result of another filter. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the logical NOT of the underlying filter's return value for the same File.booleanReturns the logical NOT of the underlying filter's return value for the same arguments.toString()Provide a String representation of this file filter.
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
filter
The filter
-
-
Constructor Details
-
NotFileFilter
Constructs a new file filter that NOTs the result of another filter.- Parameters:
filter- the filter, must not be null- Throws:
IllegalArgumentException- if the filter is null
-
-
Method Details
-
accept
Returns the logical NOT of the underlying filter's return value for the same File.- Specified by:
acceptin interfaceFileFilter- Specified by:
acceptin interfaceIOFileFilter- Overrides:
acceptin classAbstractFileFilter- Parameters:
file- the File to check- Returns:
- true if the filter returns false
-
accept
Returns the logical NOT of the underlying filter's return value for the same arguments.- Specified by:
acceptin interfaceFilenameFilter- Specified by:
acceptin interfaceIOFileFilter- Overrides:
acceptin classAbstractFileFilter- Parameters:
file- the File directoryname- the file name- Returns:
- true if the filter returns false
-
toString
Provide a String representation of this file filter.- Overrides:
toStringin classAbstractFileFilter- Returns:
- a String representation
-