public static class URIQueryParameters.RegexFilter extends Object implements FilenameFilter
Constructor and Description |
---|
RegexFilter(Pattern regex) |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(File dir,
String name)
Tests if a specified file should be included in a file list.
|
boolean |
matches(String name)
Test whether a name matches the pattern (regardless whether it is a directory or not)
|
public RegexFilter(Pattern regex)
public boolean accept(File dir, String name)
accept
in interface FilenameFilter
dir
- the directory in which the file was found.name
- the name (last component) of the file.true
if and only if the name should be
included in the file list; false
otherwise.
Returns true if the file is a directory or if it matches the glob pattern.public boolean matches(String name)
name
- the name (last component) of the fileCopyright (c) 2004-2017 Saxonica Limited. All rights reserved.