public class NameFilter extends Object
- (dash) is treated as an exclusion pattern;
all others are considered inclusion patterns- (dash) must be escaped by prepending \ (backslash)
if it should be interpreted as a literal* (asterisk) serves as a wildcard, i.e. it matches any
substring in the target name* (asterisk) occurrences within the glob to be interpreted as
literals must be escaped by prepending \ (backslash)
["foo*", "-foo99"] matches "foo" and "foo bar"
but not "foo99".
["foo\*"] matches "foo*" but not "foo99".
["\-blah"] matches "-blah".
| Modifier and Type | Field and Description |
|---|---|
static char |
ESCAPE |
static char |
EXCLUDE_PREFIX |
static char |
WILDCARD |
| Constructor and Description |
|---|
NameFilter(String[] patterns) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsWildcard() |
List<String> |
getExclusionPatterns() |
List<String> |
getInclusionPatterns() |
boolean |
matches(String name) |
public static final char WILDCARD
public static final char EXCLUDE_PREFIX
public static final char ESCAPE
public NameFilter(String[] patterns)
Copyright © 2012-2015 The Apache Software Foundation. All Rights Reserved.