public class GlobPathMatcher extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_PATH_SEPARATOR
Default path separator: "/"
|
| Constructor and Description |
|---|
GlobPathMatcher(String pattern)
Create a new instance with the
DEFAULT_PATH_SEPARATOR. |
GlobPathMatcher(String pattern,
String pathSeparator,
boolean caseSensitive)
A convenient, alternative constructor to use with a custom path separator.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
matches(String path,
boolean fullMatch)
Actually match the given
path against the given pattern. |
public static final String DEFAULT_PATH_SEPARATOR
public GlobPathMatcher(String pattern)
DEFAULT_PATH_SEPARATOR.pattern - the patternpublic GlobPathMatcher(String pattern, String pathSeparator, boolean caseSensitive)
pattern - the patternpathSeparator - the path separator to use, must not be null.caseSensitive - is case sensitivepublic boolean matches(String path, boolean fullMatch)
path against the given pattern.path - the path String to testfullMatch - whether a full pattern match is required (else a pattern match
as far as the given base path goes is sufficient)true if the supplied path matched, false if it didn'tCopyright © 2006–2022 The Apache Software Foundation. All rights reserved.