public class StringFilter extends DefaultPathFilter
StringFilter...ALL, NONE| Constructor and Description |
|---|
StringFilter(String pattern) |
| Modifier and Type | Method and Description |
|---|---|
String |
getPattern()
Returns the pattern
|
boolean |
matches(String path)
Checks if the given path matches this filters criteria.
|
void |
setPattern(String pattern)
Sets the regexp pattern for this filter.
|
String |
toString() |
isAbsolutepublic StringFilter(String pattern)
public String getPattern()
DefaultPathFiltergetPattern in class DefaultPathFilterpublic void setPattern(String pattern)
DefaultPathFilterExamples:
| Pattern | Matches | /foo | exactly "/foo" | /foo.* | all paths starting with "/foo" | ^.* /foo[^/]*$ | all files starting with "foo" | /foo/[^/]*$ | all direct children of /foo | /foo/.* | all children of /foo | /foo(/.*)? | all children of /foo and foo itself
setPattern in class DefaultPathFilterpattern - the pattern.public boolean matches(String path)
DefaultPathFiltermatches in interface PathFiltermatches in class DefaultPathFilterpath - the path to checktrue if this filter matches the criteria;
false otherwise.Copyright © 2017 The Apache Software Foundation. All rights reserved.