Package com.enonic.xp.node

## Class NodePath

- java.lang.Object
- - com.enonic.xp.node.NodePath

- All Implemented Interfaces:
    `Serializable`, `Comparable<NodePath>`

      @PublicApi
      public final class NodePath
      extends Object
      implements Comparable<NodePath>, Serializable

  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `NodePath.Builder` |
    `static class` | `NodePath.Element` | Deprecated.

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static NodePath` | `ROOT` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `NodePath​(NodePath parent, NodeName name)` |
    `NodePath​(String path)` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `NodePath` | `asAbsolute()` | Deprecated.
    `NodePath` | `asRelative()` | Deprecated.
    `int` | `compareTo​(NodePath o)` |
    `static NodePath.Builder` | `create()` |
    `static NodePath.Builder` | `create​(NodePath source)` |
    `static NodePath.Builder` | `create​(NodePath parent, String path)` | Deprecated.
    `static NodePath.Builder` | `create​(String path)` | Deprecated.
    `int` | `elementCount()` | Deprecated.
    `boolean` | `equals​(Object o)` |
    `String` | `getElementAsString​(int index)` | Deprecated.
    `NodePath.Element` | `getLastElement()` | Deprecated.
    `String` | `getName()` |
    `NodePath` | `getParentPath()` |
    `List<NodePath>` | `getParentPaths()` |
    `int` | `hashCode()` |
    `boolean` | `hasTrailingDivider()` | Deprecated.
    `boolean` | `isAbsolute()` |
    `boolean` | `isEmpty()` |
    `boolean` | `isRelative()` | Deprecated.
    `boolean` | `isRoot()` |
    `Iterator<NodePath.Element>` | `iterator()` | Deprecated.
    `NodePath` | `removeFromBeginning​(NodePath path)` | Deprecated.
    `Iterable<String>` | `resolvePathElementNames()` | Deprecated.
    `String` | `toString()` |
    `NodePath` | `trimTrailingDivider()` | Deprecated.

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### ROOT

          public static final NodePath ROOT

  - ### Constructor Detail

    - #### NodePath

          public NodePath​(String path)

    - #### NodePath

          public NodePath​(NodePath parent,
                          NodeName name)

  - ### Method Detail

    - #### isRoot

          public boolean isRoot()

    - #### asRelative

          @Deprecated
          public NodePath asRelative()

      Deprecated.

    - #### asAbsolute

          @Deprecated
          public NodePath asAbsolute()

      Deprecated.

    - #### getParentPath

          public NodePath getParentPath()

    - #### getParentPaths

          public List<NodePath> getParentPaths()

    - #### isEmpty

          public boolean isEmpty()

    - #### isAbsolute

          public boolean isAbsolute()

    - #### isRelative

          @Deprecated
          public boolean isRelative()

      Deprecated.

    - #### hasTrailingDivider

          @Deprecated
          public boolean hasTrailingDivider()

      Deprecated.

    - #### trimTrailingDivider

          @Deprecated
          public NodePath trimTrailingDivider()

      Deprecated.

    - #### elementCount

          @Deprecated
          public int elementCount()

      Deprecated.

    - #### iterator

          @Deprecated
          public Iterator<NodePath.Element> iterator()

      Deprecated.

    - #### getElementAsString

          @Deprecated
          public String getElementAsString​(int index)

      Deprecated.

    - #### getLastElement

          @Deprecated
          public NodePath.Element getLastElement()

      Deprecated.

    - #### getName

          public String getName()

    - #### resolvePathElementNames

          @Deprecated
          public Iterable<String> resolvePathElementNames()

      Deprecated.

    - #### removeFromBeginning

          @Deprecated
          public NodePath removeFromBeginning​(NodePath path)

      Deprecated.

    - #### equals

          public boolean equals​(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### create

          public static NodePath.Builder create()

    - #### create

          @Deprecated
          public static NodePath.Builder create​(String path)

      Deprecated.

    - #### create

          public static NodePath.Builder create​(NodePath source)

    - #### create

          @Deprecated
          public static NodePath.Builder create​(NodePath parent,
                                                String path)

      Deprecated.

    - #### compareTo

          public int compareTo​(NodePath o)

      Specified by:
        `compareTo` in interface `Comparable<NodePath>`