Package rma.util
Class WildCardFileFilter
java.lang.Object
rma.util.WildCardFileFilter
- All Implemented Interfaces:
FilenameFilter
An implementation of the FileFilter interfaces that filters files based
on a file name pattern. The file name patterns are case-insensitive
and make use of the ? and * wildcard characters.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new WildCardFileFilter with the provided pattern. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Tests if a specified file should be included in a file list.char[]
static boolean
Checks to see if a provided file name matches the provided pattern.void
setAcceptDirectories
(boolean b) void
setPattern
(String s) static String
Converts the provided pattern to it's minimum equivalent.
-
Constructor Details
-
WildCardFileFilter
Creates a new WildCardFileFilter with the provided pattern. The toMinimalPattern() method is implicitly called on the provided pattern.
-
-
Method Details
-
getPattern
public char[] getPattern() -
setPattern
-
setAcceptDirectories
public void setAcceptDirectories(boolean b) -
accept
Tests if a specified file should be included in a file list.- Specified by:
accept
in interfaceFilenameFilter
-
toMinimalPattern
Converts the provided pattern to it's minimum equivalent. Basically this method converts all touching *'s to a single *. -
match
Checks to see if a provided file name matches the provided pattern.
-