Package org.apache.uima.pear.util
Class FileUtil.ExtFilenameFilter
java.lang.Object
org.apache.uima.pear.util.FileUtil.ExtFilenameFilter
- All Implemented Interfaces:
FilenameFilter
- Enclosing class:
- FileUtil
The
ExtFileFilter
allows to filter file names based on the specified filename
extension.-
Constructor Summary
ConstructorDescriptionExtFilenameFilter
(String fileExt) Create instance of theExtFileFilter
class for a given filename extension.ExtFilenameFilter
(String fileExt, boolean ignoreCase) Create instance of theExtFileFilter
class for a given filename extension. -
Method Summary
-
Constructor Details
-
ExtFilenameFilter
Create instance of theExtFileFilter
class for a given filename extension. By default, this filename filter is case insensitive. If the given filename extension does not start from the '.' character, adds this character at the beginning.- Parameters:
fileExt
- The given filename extension.
-
ExtFilenameFilter
Create instance of theExtFileFilter
class for a given filename extension. If a givenboolean
flag istrue
, this filename filter is case insensitive, otherwise it's case sensitive. If the given filename extension does not start from the '.' character, adds this character at the beginning.- Parameters:
fileExt
- The given filename extension.ignoreCase
- The given 'case sensitivity' flag.
-
-
Method Details
-
accept
Tests if a specified file should be included in a file list.- Specified by:
accept
in interfaceFilenameFilter
- Parameters:
dir
- The directory in which the file was found.name
- The given name of the file.- Returns:
true
, if the given file should be included in the list,false
otherwise.
-