|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.quattor.pan.utils.Path
public class Path
This immutable class represents a pan path. The paths can be either absolute or relative. The individual path terms are validated when the Path is created; an EvaluationException will be thrown if there is a syntax error.
| Nested Class Summary | |
|---|---|
static class |
Path.PathType
An enumeration containing the three different types of paths. |
| Constructor Summary | |
|---|---|
Path(Path root,
Term[] terms)
Constructor which will create a new Path from the concatenation of two existing paths. |
|
Path(java.lang.String path)
Constructor of a path from a String. |
|
| Method Summary | |
|---|---|
int |
compareTo(Path o)
The default ordering for paths is such that it will produce a post-traversal ordering. |
boolean |
equals(java.lang.Object obj)
Determine if two paths are equal. |
java.lang.String |
getAuthority()
Return the authority for this path or null if it doesn't exist. |
Path.PathType |
getPathType()
Get the type of this path. |
Term[] |
getTerms()
Get the list of terms in this path. |
Path.PathType |
getType()
Return the type (EXTERNAL, ABSOLUTE, or RELATIVE) for this path. |
int |
hashCode()
This must be defined so that Paths can be used properly in Maps. |
boolean |
isAbsolute()
A convenience method which returns a boolean indicating whether the Path is absolute or not. |
boolean |
isExternal()
A convenience method which returns a boolean indicating whether the Path is external or not. |
boolean |
isRelative()
A convenience method which returns a boolean indicating whether the Path is relative or not. |
static Path |
resolve(Path prefix,
Path relative)
|
java.util.List<java.lang.String> |
toList()
This method returns the Path as an unmodifiable list of the terms comprising the Path. |
java.lang.String |
toString()
Convert this path to a string. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Path(java.lang.String path)
throws SyntaxException
SyntaxException
public Path(Path root,
Term[] terms)
throws SyntaxException
SyntaxException| Method Detail |
|---|
public java.util.List<java.lang.String> toList()
public Term[] getTerms()
public static Path resolve(Path prefix,
Path relative)
throws SyntaxException
SyntaxExceptionpublic Path.PathType getType()
public java.lang.String getAuthority()
public boolean isAbsolute()
public boolean isRelative()
public boolean isExternal()
public Path.PathType getPathType()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic int compareTo(Path o)
compareTo in interface java.lang.Comparable<Path>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||