Package org.apache.tomcat.util.file
Class Matcher
- java.lang.Object
- 
- org.apache.tomcat.util.file.Matcher
 
- 
 public final class Matcher extends java.lang.ObjectThis 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 SummaryConstructors Constructor Description Matcher()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanmatch(java.lang.String pattern, java.lang.String str, boolean caseSensitive)Tests whether or not a string matches against a pattern.static booleanmatchName(java.util.Set<java.lang.String> patternSet, java.lang.String fileName)Tests whether or not a given file name matches any file name pattern in the given set.
 
- 
- 
- 
Method Detail- 
matchNamepublic static boolean matchName(java.util.Set<java.lang.String> patternSet, java.lang.String fileName)Tests whether or not a given file name matches any file name pattern in the given set. The match is performed case-sensitively.- Parameters:
- 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.
- Returns:
- trueif any pattern in the set matches against the file name, or- falseotherwise.
- See Also:
- match(String, String, boolean)
 
 - 
matchpublic static boolean match(java.lang.String pattern, java.lang.String str, boolean caseSensitive)Tests whether or not a string matches against a pattern. The pattern may contain two special characters:
 '*' means zero or more characters
 '?' means one and only one character- Parameters:
- 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.
- Returns:
- trueif the string matches against the pattern, or- falseotherwise.
 
 
- 
 
-