public abstract class PatternMatcher
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static boolean |
match(java.lang.String pattern,
java.lang.String str,
boolean isCaseSensitive)
THIS CODE WAS BORROWED FROM org.apache.tools.ant.types.selectors.SelectorUtils
Tests whether or not a string matches against a pattern.
|
static boolean |
pathConflicts(java.lang.String path,
IncludeExcludePatterns patterns)
Indicates whether the given path conflicts with the given patterns.
A path will conflict if: The include patterns list is not empty, and the path does not match any contained pattern. |
public static boolean pathConflicts(java.lang.String path,
IncludeExcludePatterns patterns)
path - Path to checkpatterns - Patterns to matchpublic static boolean match(java.lang.String pattern,
java.lang.String str,
boolean isCaseSensitive)
pattern - The pattern to match against. Must not be null.str - The string which must be matched against the pattern. Must not be null.isCaseSensitive - Whether or not matching should be performed case sensitively.true if the string matches against the pattern, or false otherwise.