|
Apache Tomcat 7.0.54 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tomcat.util.file.Matcher
public final class Matcher
This is a utility class to match file globs. The class has been derived from org.apache.tools.ant.types.selectors.SelectorUtils.
All methods are static.
Constructor Summary | |
---|---|
Matcher()
|
Method Summary | |
---|---|
static boolean |
match(String pattern,
String str,
boolean caseSensitive)
Tests whether or not a string matches against a pattern. |
static boolean |
matchName(Set<String> patternSet,
String fileName)
Tests whether or not a given file name matches any file name pattern in the given set. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Matcher()
Method Detail |
---|
public static boolean matchName(Set<String> patternSet, String fileName)
patternSet
- The pattern set to match against. Must not be
null
.fileName
- The file name to match, as a String. Must not be
null
. It must be just a file name, without
a path.
true
if any pattern in the set matches against the
file name, or false
otherwise.match(String, String, boolean)
public static boolean match(String pattern, String str, boolean caseSensitive)
pattern
- The pattern to match against.
Must not be null
.str
- The string which must be matched against the pattern.
Must not be null
.caseSensitive
- Whether or not matching should be performed
case sensitively.
true
if the string matches against the pattern,
or false
otherwise.
|
Apache Tomcat 7.0.54 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |