public class DefaultPathFilter extends java.lang.Object implements PathFilter
ALL, NONE
Constructor and Description |
---|
DefaultPathFilter()
Default constructor
|
DefaultPathFilter(java.lang.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(java.lang.Object o) |
java.lang.String |
getPattern()
Returns the pattern
|
int |
hashCode() |
boolean |
isAbsolute()
Checks if the pattern is absolute, i.e.
|
boolean |
matches(java.lang.String path)
Checks if the given path matches this filters criteria.
|
void |
setPattern(java.lang.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(java.lang.String pattern)
pattern
- the patternsetPattern(java.lang.String)
public void setPattern(java.lang.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 java.lang.String getPattern()
public boolean matches(java.lang.String path)
matches
in interface PathFilter
path
- the path to checktrue
if this filter matches the criteria;
false
otherwise.public boolean isAbsolute()
isAbsolute
in interface PathFilter
true
if pattern is absolutepublic PathFilter translate(PathMapping mapping)
translate
in interface PathFilter
mapping
- the mapping to applypublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public void dump(DumpContext ctx, boolean isLast)
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"