Package org.apache.uima.pear.util
Class FileUtil.ExtFilenameFilter
- java.lang.Object
-
- org.apache.uima.pear.util.FileUtil.ExtFilenameFilter
-
- All Implemented Interfaces:
java.io.FilenameFilter
- Enclosing class:
- FileUtil
public static class FileUtil.ExtFilenameFilter extends java.lang.Object implements java.io.FilenameFilterTheExtFileFilterallows to filter file names based on the specified filename extension.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String_fileExtprivate boolean_ignoreCase
-
Constructor Summary
Constructors Constructor Description ExtFilenameFilter(java.lang.String fileExt)Create instance of theExtFileFilterclass for a given filename extension.ExtFilenameFilter(java.lang.String fileExt, boolean ignoreCase)Create instance of theExtFileFilterclass for a given filename extension.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccept(java.io.File dir, java.lang.String name)Tests if a specified file should be included in a file list.
-
-
-
Constructor Detail
-
ExtFilenameFilter
public ExtFilenameFilter(java.lang.String fileExt)
Create instance of theExtFileFilterclass 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
public ExtFilenameFilter(java.lang.String fileExt, boolean ignoreCase)Create instance of theExtFileFilterclass for a given filename extension. If a givenbooleanflag 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 Detail
-
accept
public boolean accept(java.io.File dir, java.lang.String name)Tests if a specified file should be included in a file list.- Specified by:
acceptin interfacejava.io.FilenameFilter- 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,falseotherwise.
-
-