|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.dna.graph.property.basic.AbstractPath
org.jboss.dna.graph.property.basic.BasicPath
@Immutable public class BasicPath

A basic implementation of Path.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.jboss.dna.graph.property.Path |
|---|
Path.Segment |
| Field Summary | |
|---|---|
static Path |
EMPTY_RELATIVE
|
static Path |
PARENT_PATH
|
static Path |
SELF_PATH
|
| Fields inherited from interface org.jboss.dna.graph.property.Path |
|---|
DEFAULT_DECODER, DEFAULT_ENCODER, DEFAULT_INDEX, DELIMITER, DELIMITER_STR, JSR283_DECODER, JSR283_ENCODER, NO_OP_DECODER, NO_OP_ENCODER, PARENT, PARENT_NAME, PARENT_SEGMENT, SELF, SELF_NAME, SELF_SEGMENT, URL_DECODER, URL_ENCODER |
| Constructor Summary | |
|---|---|
BasicPath(List<Path.Segment> segments,
boolean absolute)
|
|
| Method Summary | |
|---|---|
Path |
getAncestor(int degree)
Return the path to the ancestor of the supplied degree. |
List<Path.Segment> |
getSegmentsList()
Get an unmodifiable list of the path segments. |
boolean |
isAbsolute()
Return whether this path is an absolute path. |
boolean |
isNormalized()
Return whether this path is normalized and contains no unnecessary "." segments and as few ".." segments as possible. |
boolean |
isRoot()
Return whether this path represents the root path. |
int |
size()
Return the number of segments in this path. |
| Methods inherited from class org.jboss.dna.graph.property.basic.AbstractPath |
|---|
compareTo, endsWith, endsWith, equals, getCanonicalPath, getCommonAncestor, getLastSegment, getNormalizedPath, getParent, getSegment, getSegmentsArray, getString, getString, getString, getString, getString, hashCode, hasSameAncestor, isAncestorOf, isAtOrAbove, isAtOrBelow, isDecendantOf, isSameAs, iterator, pathsFromRoot, relativeTo, relativeToRoot, resolve, resolveAgainst, subpath, subpath, toString |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Path EMPTY_RELATIVE
public static final Path SELF_PATH
public static final Path PARENT_PATH
| Constructor Detail |
|---|
public BasicPath(List<Path.Segment> segments,
boolean absolute)
segments - the segmentsabsolute - true if this path is absolute, or false otherwise| Method Detail |
|---|
public Path getAncestor(int degree)
x is the path that is x
levels up along the path. For example, degree = 0 returns this path, while degree = 1
returns the parent of this path, degree = 2 returns the grandparent of this path, and so on. Note that the
result may be unexpected if this path is not normalized, as a non-normalized path contains ".." and
"." segments.
public List<Path.Segment> getSegmentsList()
public boolean isAbsolute()
absolute. An absolute path
starts with a "/".
public boolean isNormalized()
public boolean isRoot()
public int size()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||