Package com.enonic.xp.node
Class NodePath
- java.lang.Object
-
- com.enonic.xp.node.NodePath
-
- All Implemented Interfaces:
Comparable<NodePath>
@PublicApi public final class NodePath extends Object implements Comparable<NodePath>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NodePath.Builder
static class
NodePath.Element
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description NodePath
asAbsolute()
NodePath
asRelative()
int
compareTo(NodePath o)
static NodePath.Builder
create()
static NodePath.Builder
create(NodePath source)
static NodePath.Builder
create(NodePath parent, String path)
static NodePath.Builder
create(String path)
int
elementCount()
boolean
equals(Object o)
protected NodePath.Element
getElement(int index)
String
getElementAsString(int index)
protected NodePath.Element
getFirstElement()
NodePath.Element
getLastElement()
String
getName()
NodePath
getParentPath()
List<NodePath>
getParentPaths()
int
hashCode()
boolean
hasTrailingDivider()
boolean
isAbsolute()
boolean
isEmpty()
boolean
isRelative()
boolean
isRoot()
Iterator<NodePath.Element>
iterator()
NodePath
removeFromBeginning(NodePath path)
Iterable<String>
resolvePathElementNames()
String
toString()
NodePath
trimTrailingDivider()
-
-
-
Field Detail
-
ROOT
public static final NodePath ROOT
-
-
Method Detail
-
isRoot
public boolean isRoot()
-
asRelative
public NodePath asRelative()
-
asAbsolute
public NodePath asAbsolute()
-
getParentPath
public NodePath getParentPath()
-
create
public static NodePath.Builder create()
-
create
public static NodePath.Builder create(NodePath parent, String path)
-
isEmpty
public boolean isEmpty()
-
isAbsolute
public boolean isAbsolute()
-
isRelative
public boolean isRelative()
-
hasTrailingDivider
public boolean hasTrailingDivider()
-
trimTrailingDivider
public NodePath trimTrailingDivider()
-
elementCount
public int elementCount()
-
iterator
public Iterator<NodePath.Element> iterator()
-
getFirstElement
protected NodePath.Element getFirstElement()
-
getElement
protected NodePath.Element getElement(int index)
-
getElementAsString
public String getElementAsString(int index)
-
getLastElement
public NodePath.Element getLastElement()
-
getName
public String getName()
-
create
public static NodePath.Builder create(NodePath source)
-
create
public static NodePath.Builder create(String path)
-
compareTo
public int compareTo(NodePath o)
- Specified by:
compareTo
in interfaceComparable<NodePath>
-
-