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,- FileVisitor<Path>,- PathMatcher,- PathFilter,- PathVisitor,- IOFileFilter
This filter produces a logical NOT of the filters specified.
 
Deprecating Serialization
Serialization is deprecated and will be removed in 3.0.
- Since:
- 1.0
- See Also:
- 
Field SummaryFields inherited from interface org.apache.commons.io.filefilter.IOFileFilterEMPTY_STRING_ARRAY
- 
Constructor SummaryConstructorsConstructorDescriptionNotFileFilter(IOFileFilter filter) Constructs a new file filter that NOTs the result of another filter.
- 
Method SummaryModifier 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.accept(Path file, BasicFileAttributes attributes) Returns the logical NOT of the underlying filter's return value for the same File.toString()Provide a String representation of this file filter.Methods inherited from class org.apache.commons.io.filefilter.AbstractFileFilterhandle, postVisitDirectory, preVisitDirectory, visitFile, visitFileFailedMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.commons.io.filefilter.IOFileFilterand, matches, negate, or
- 
Constructor Details- 
NotFileFilterConstructs a new file filter that NOTs the result of another filter.- Parameters:
- filter- the filter, must not be null
- Throws:
- NullPointerException- if the filter is null
 
 
- 
- 
Method Details- 
acceptReturns the logical NOT of the underlying filter's return value for the same File.- Specified by:
- acceptin interface- FileFilter
- Specified by:
- acceptin interface- IOFileFilter
- Overrides:
- acceptin class- AbstractFileFilter
- Parameters:
- file- the File to check
- Returns:
- true if the filter returns false
 
- 
acceptReturns the logical NOT of the underlying filter's return value for the same arguments.- Specified by:
- acceptin interface- FilenameFilter
- Specified by:
- acceptin interface- IOFileFilter
- Overrides:
- acceptin class- AbstractFileFilter
- Parameters:
- file- the File directory
- name- the file name
- Returns:
- true if the filter returns false
 
- 
acceptReturns the logical NOT of the underlying filter's return value for the same File.- Specified by:
- acceptin interface- IOFileFilter
- Specified by:
- acceptin interface- PathFilter
- Parameters:
- file- the File to check
- attributes- the path's basic attributes (may be null).
- Returns:
- true if the filter returns false
- Since:
- 2.9.0
 
- 
toStringProvide a String representation of this file filter.- Overrides:
- toStringin class- AbstractFileFilter
- Returns:
- a String representation
 
 
-