Package org.apache.commons.io.filefilter
Class FalseFileFilter
- java.lang.Object
-
- org.apache.commons.io.filefilter.FalseFileFilter
-
- All Implemented Interfaces:
java.io.FileFilter,java.io.FilenameFilter,java.io.Serializable,PathFilter,IOFileFilter
public class FalseFileFilter extends java.lang.Object implements IOFileFilter, java.io.Serializable
A file filter that always returns false.Deprecating Serialization
Serialization is deprecated and will be removed in 3.0.
- Since:
- 1.0
- See Also:
FileFilterUtils.falseFileFilter(), Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static IOFileFilterFALSESingleton instance of false filter.static IOFileFilterINSTANCESingleton instance of false filter.-
Fields inherited from interface org.apache.commons.io.filefilter.IOFileFilter
EMPTY_STRING_ARRAY
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccept(java.io.File file)Returns false.booleanaccept(java.io.File dir, java.lang.String name)Returns false.java.nio.file.FileVisitResultaccept(java.nio.file.Path file, java.nio.file.attribute.BasicFileAttributes attributes)Returns false.IOFileFilterand(IOFileFilter fileFilter)Creates a new "and" filter with this filter.IOFileFilternegate()Creates a new "not" filter with this filter.IOFileFilteror(IOFileFilter fileFilter)Creates a new "or" filter with this filter.java.lang.StringtoString()
-
-
-
Field Detail
-
FALSE
public static final IOFileFilter FALSE
Singleton instance of false filter.- Since:
- 1.3
-
INSTANCE
public static final IOFileFilter INSTANCE
Singleton instance of false filter. Please use the identical FalseFileFilter.FALSE constant. The new name is more JDK 1.5 friendly as it doesn't clash with other values when using static imports.
-
-
Method Detail
-
accept
public boolean accept(java.io.File file)
Returns false.- Specified by:
acceptin interfacejava.io.FileFilter- Specified by:
acceptin interfaceIOFileFilter- Parameters:
file- the file to check (ignored)- Returns:
- false
-
accept
public boolean accept(java.io.File dir, java.lang.String name)Returns false.- Specified by:
acceptin interfacejava.io.FilenameFilter- Specified by:
acceptin interfaceIOFileFilter- Parameters:
dir- the directory to check (ignored)name- the file name (ignored)- Returns:
- false
-
accept
public java.nio.file.FileVisitResult accept(java.nio.file.Path file, java.nio.file.attribute.BasicFileAttributes attributes)Returns false.- Specified by:
acceptin interfaceIOFileFilter- Specified by:
acceptin interfacePathFilter- Parameters:
file- the file to check (ignored)attributes- the file's basic attributes (TODO may be null).- Returns:
- false
- Since:
- 2.9.0
-
and
public IOFileFilter and(IOFileFilter fileFilter)
Description copied from interface:IOFileFilterCreates a new "and" filter with this filter.- Specified by:
andin interfaceIOFileFilter- Parameters:
fileFilter- the filter to "and".- Returns:
- a new filter.
-
negate
public IOFileFilter negate()
Description copied from interface:IOFileFilterCreates a new "not" filter with this filter.- Specified by:
negatein interfaceIOFileFilter- Returns:
- a new filter.
-
or
public IOFileFilter or(IOFileFilter fileFilter)
Description copied from interface:IOFileFilterCreates a new "or" filter with this filter.- Specified by:
orin interfaceIOFileFilter- Parameters:
fileFilter- the filter to "or".- Returns:
- a new filter.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-