org.modeshape.graph.property
Interface Path.Segment

All Superinterfaces:
Cloneable, Comparable<Path.Segment>, Readable, Serializable
Enclosing interface:
Path

@Immutable
public static interface Path.Segment
extends Cloneable, Comparable<Path.Segment>, Serializable, Readable

Representation of the segments that occur within a path.

Author:
Randall Hauch

Method Summary
 int getIndex()
          Get the index for this segment, which will be 1 by default.
 Name getName()
          Get the name component of this segment.
 String getUnencodedString()
          Get the raw string form of the segment using the no-op encoder.
 boolean hasIndex()
          Return whether this segment has an index.
 boolean isIdentifier()
          Return whether this segment is an identifier segment.
 boolean isParentReference()
          Return whether this segment is a reference to a parent.
 boolean isSelfReference()
          Return whether this segment is a self-reference.
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface org.modeshape.graph.property.Readable
getString, getString, getString, getString, getString
 

Method Detail

getName

Name getName()
Get the name component of this segment.

Returns:
the segment's name

getIndex

int getIndex()
Get the index for this segment, which will be 1 by default.

Returns:
the index

hasIndex

boolean hasIndex()
Return whether this segment has an index.

Returns:
true if this segment has an index, or false otherwise.

isSelfReference

boolean isSelfReference()
Return whether this segment is a self-reference.

Returns:
true if the segment is a self-reference, or false otherwise.

isParentReference

boolean isParentReference()
Return whether this segment is a reference to a parent.

Returns:
true if the segment is a parent-reference, or false otherwise.

isIdentifier

boolean isIdentifier()
Return whether this segment is an identifier segment.

Returns:
true if the segment is an identifier segment, or false otherwise.

getUnencodedString

String getUnencodedString()
Get the raw string form of the segment using the no-op encoder. This is equivalent to calling getString(Path.NO_OP_ENCODER).

Returns:
the un-encoded string
See Also:
Readable.getString(TextEncoder)


Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.