Package org.apache.commons.io.filefilter
Class TrueFileFilter
- java.lang.Object
-
- org.apache.commons.io.filefilter.TrueFileFilter
-
- All Implemented Interfaces:
java.io.FileFilter
,java.io.FilenameFilter
,java.io.Serializable
,IOFileFilter
public class TrueFileFilter extends java.lang.Object implements IOFileFilter, java.io.Serializable
A file filter that always returns true.- Since:
- 1.0
- Version:
- $Id$
- See Also:
FileFilterUtils.trueFileFilter()
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static IOFileFilter
INSTANCE
Singleton instance of true filter.private static long
serialVersionUID
static IOFileFilter
TRUE
Singleton instance of true filter.
-
Constructor Summary
Constructors Modifier Constructor Description protected
TrueFileFilter()
Restrictive constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
accept(java.io.File file)
Returns true.boolean
accept(java.io.File dir, java.lang.String name)
Returns true.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
TRUE
public static final IOFileFilter TRUE
Singleton instance of true filter.- Since:
- 1.3
-
INSTANCE
public static final IOFileFilter INSTANCE
Singleton instance of true filter. Please use the identical TrueFileFilter.TRUE 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 true.- Specified by:
accept
in interfacejava.io.FileFilter
- Specified by:
accept
in interfaceIOFileFilter
- Parameters:
file
- the file to check (ignored)- Returns:
- true
-
accept
public boolean accept(java.io.File dir, java.lang.String name)
Returns true.- Specified by:
accept
in interfacejava.io.FilenameFilter
- Specified by:
accept
in interfaceIOFileFilter
- Parameters:
dir
- the directory to check (ignored)name
- the filename (ignored)- Returns:
- true
-
-