public final class WildMatcher extends AbstractMatcher
**
) pattern only. This
matcher matches any path.
This class is immutable and thread safe.
Modifier and Type | Field and Description |
---|---|
(package private) static java.lang.String |
WILDMATCH |
(package private) static java.lang.String |
WILDMATCH2 |
dirOnly, pattern
Constructor and Description |
---|
WildMatcher(boolean dirOnly) |
Modifier and Type | Method and Description |
---|---|
private static boolean |
isSubdirectory(java.lang.String path) |
boolean |
matches(java.lang.String path,
boolean assumeDirectory,
boolean pathMatch)
Matches entire given string
|
boolean |
matches(java.lang.String segment,
int startIncl,
int endExcl)
Matches only part of given string
|
equals, hashCode, toString
static final java.lang.String WILDMATCH
static final java.lang.String WILDMATCH2
public final boolean matches(java.lang.String path, boolean assumeDirectory, boolean pathMatch)
path
- string which is not null, but might be emptyassumeDirectory
- true to assume this path as directory (even if it doesn't end
with a slash)pathMatch
- true
if the match is for the full path: prefix-only
matches are not allowed, and
NameMatcher
s must
match only the last component (if they can -- they may not, if
they are anchored at the beginning)public final boolean matches(java.lang.String segment, int startIncl, int endExcl)
segment
- string which is not null, but might be emptystartIncl
- start index, inclusiveendExcl
- end index, exclusiveprivate static boolean isSubdirectory(java.lang.String path)