|
ModeShape Distribution 3.0.0.Beta4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.modeshape.jcr.value.basic.AbstractPath
org.modeshape.jcr.value.basic.BasicPath
@Immutable public class BasicPath
A basic implementation of Path
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.modeshape.jcr.value.Path |
---|
Path.Segment |
Field Summary | |
---|---|
static Path |
EMPTY_RELATIVE
|
static Path |
PARENT_PATH
|
static Path |
SELF_PATH
|
Fields inherited from class org.modeshape.jcr.value.basic.AbstractPath |
---|
EMPTY_PATH_ITERATOR |
Fields inherited from interface org.modeshape.jcr.value.Path |
---|
DEFAULT_DECODER, DEFAULT_ENCODER, DEFAULT_INDEX, DELIMITER, DELIMITER_STR, IDENTIFIER_LEADING_TERMINAL, IDENTIFIER_TRAILING_TERMINAL, JSR283_DECODER, JSR283_ENCODER, NO_OP_DECODER, NO_OP_ENCODER, PARENT, PARENT_NAME, PARENT_SEGMENT, ROOT_NAME, ROOT_PATH, 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. |
protected Iterator<Path.Segment> |
getSegmentsOfParent()
Method used by AbstractPath.equals(Object) implementation to quickly get an Iterator over the segments in the
parent. |
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.modeshape.jcr.value.basic.AbstractPath |
---|
compareTo, createSegmentsSubList, doGetString, endsWith, endsWith, equals, getCanonicalPath, getCommonAncestor, getLastSegment, getNormalizedPath, getParent, getSegment, getSegmentsArray, getString, getString, getString, getString, getString, hashCode, hasSameAncestor, isAncestorOf, isAtOrAbove, isAtOrBelow, isDescendantOf, isIdentifier, isNormalized, isSameAs, iterator, pathsFromRoot, relativeTo, relativeToRoot, resolve, resolveAgainst, subpath, subpath, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, 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 otherwiseMethod Detail |
---|
public Path getAncestor(int degree)
Path
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.
protected Iterator<Path.Segment> getSegmentsOfParent()
AbstractPath
AbstractPath.equals(Object)
implementation to quickly get an Iterator over the segments in the
parent.
getSegmentsOfParent
in class AbstractPath
public List<Path.Segment> getSegmentsList()
Path
public boolean isAbsolute()
Path
absolute
. An absolute path
starts with a "/".
public boolean isNormalized()
Path
public boolean isRoot()
Path
public int size()
Path
|
ModeShape Distribution 3.0.0.Beta4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |