public class DefaultPathFilter extends Object implements PathFilter
ALL, NONE| Constructor and Description |
|---|
DefaultPathFilter()
Default constructor
|
DefaultPathFilter(String pattern)
Creates a new default path filter
|
| Modifier and Type | Method and Description |
|---|---|
void |
dump(DumpContext ctx,
boolean isLast)
Dumps some human readable information using the given context.
|
boolean |
equals(Object o) |
String |
getPattern()
Returns the pattern
|
int |
hashCode() |
boolean |
isAbsolute()
Checks if the pattern is absolute, i.e.
|
boolean |
matches(String path)
Checks if the given path matches this filters criteria.
|
void |
setPattern(String pattern)
Sets the regexp pattern for this filter.
|
PathFilter |
translate(PathMapping mapping)
Translates this path filter with the given mapping.
|
public DefaultPathFilter()
public DefaultPathFilter(String pattern)
pattern - the patternsetPattern(java.lang.String)public void setPattern(String pattern)
| 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
pattern - the pattern.public String getPattern()
public boolean matches(String path)
matches in interface PathFilterpath - the path to checktrue if this filter matches the criteria;
false otherwise.public boolean isAbsolute()
isAbsolute in interface PathFiltertrue if pattern is absolutepublic PathFilter translate(PathMapping mapping)
translate in interface PathFiltermapping - the mapping to applypublic void dump(DumpContext ctx, boolean isLast)
Copyright © 2010 - 2020 Adobe. All Rights Reserved