Este conteúdo não está disponível no idioma selecionado.
16.27. Path Segment Interface
Each Path.Segment is an immutable pair of a Name and same-name-sibling (SNS) index. When two sibling nodes have the same name, then the first sibling will have SNS index of "1" and the second will be given a SNS index of "2". (This mirrors the same-name-sibling index behavior of JCR paths.)
@Immutable
public static interface Path.Segment extends Cloneable, Comparable<Path.Segment>, Serializable, Readable
{
/**
* Get the name component of this segment.
* @return the segment's name
*/
public Name getName();
/**
* Get the index for this segment, which will be 1 by default.
* @return the index
*/
public int getIndex();
/**
* Return whether this segment has an index that is not "1"
* @return true if this segment has an index, or false otherwise.
*/
public boolean hasIndex();
/**
* Return whether this segment is a self-reference (or ".").
* @return true if the segment is a self-reference, or false otherwise.
*/
public boolean isSelfReference();
/**
* Return whether this segment is a reference to a parent (or "..")
* @return true if the segment is a parent-reference, or false otherwise.
*/
public boolean isParentReference();
}