public class RegExFileFilter extends Object implements FileFilter
Pattern
.
Preciesly, it will accept exactly those File
s for which
the matches() method of the Pattern returns true on the output of the getName()
method of the File.Constructor and Description |
---|
RegExFileFilter(Pattern pattern)
Sets up a RegExFileFilter which checks if the file name (not the
entire path) matches the passed in
Pattern . |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(File file)
Checks whether a file satisfies the selection filter.
|
public boolean accept(File file)
accept
in interface FileFilter
file
- The file