public abstract class PathSpec extends Object implements Comparable<PathSpec>
Modifier and Type | Field and Description |
---|---|
protected PathSpecGroup |
group |
protected int |
pathDepth |
protected String |
pathSpec |
protected int |
specLength |
Constructor and Description |
---|
PathSpec() |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(PathSpec other) |
boolean |
equals(Object obj) |
PathSpecGroup |
getGroup() |
int |
getPathDepth()
Get the number of path elements that this path spec declares.
|
abstract String |
getPathInfo(String path)
Return the portion of the path that is after the path spec.
|
abstract String |
getPathMatch(String path)
Return the portion of the path that matches a path spec.
|
String |
getPathSpec()
The as-provided path spec.
|
abstract String |
getRelativePath(String base,
String path)
Get the relative path.
|
int |
hashCode() |
abstract boolean |
matches(String path)
Test to see if the provided path matches this path spec
|
String |
toString() |
protected String pathSpec
protected PathSpecGroup group
protected int pathDepth
protected int specLength
public int compareTo(PathSpec other)
compareTo
in interface Comparable<PathSpec>
public PathSpecGroup getGroup()
public int getPathDepth()
This is used to determine longest match logic.
public abstract String getPathInfo(String path)
path
- the path to match againstpublic abstract String getPathMatch(String path)
path
- the path to match againstpublic String getPathSpec()
public abstract String getRelativePath(String base, String path)
base
- the base the path is relative topath
- the additional pathpublic abstract boolean matches(String path)
path
- the path to testCopyright © 1995-2015 Webtide. All Rights Reserved.