public class Path extends Object implements Comparable<Path>
| Modifier and Type | Class and Description |
|---|---|
static class |
Path.PathType
An enumeration containing the three different types of paths.
|
| Constructor and Description |
|---|
Path(Path root,
Term[] terms)
Constructor which will create a new Path from the concatenation of two
existing paths.
|
Path(String path)
Constructor of a path from a String.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Path o)
The default ordering for paths is such that it will produce a
post-traversal ordering.
|
boolean |
equals(Object obj)
Determine if two paths are equal.
|
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) |
List<String> |
toList()
This method returns the Path as an unmodifiable list of the terms
comprising the Path.
|
String |
toString()
Convert this path to a string.
|
public Path(String path) throws SyntaxException
SyntaxExceptionpublic Path(Path root, Term[] terms) throws SyntaxException
SyntaxExceptionpublic List<String> toList()
public Term[] getTerms()
public static Path resolve(Path prefix, Path relative) throws SyntaxException
SyntaxExceptionpublic Path.PathType getType()
public String getAuthority()
public boolean isAbsolute()
public boolean isRelative()
public boolean isExternal()
public Path.PathType getPathType()
public boolean equals(Object obj)
public int hashCode()
public String toString()
public int compareTo(Path o)
compareTo in interface Comparable<Path>Copyright © 2014 Quattor. All Rights Reserved.