Class NodePath


  • public class NodePath
    extends Object
    Represents a path to a node within the data model. Any node in a data model can be represented by its path. The node path can be used to identify and locate a single node in the document tree.
    Author:
    eric.wittmann@gmail.com
    • Constructor Detail

      • NodePath

        public NodePath()
    • Method Detail

      • removeFirst

        public NodePathSegment removeFirst()
        Removes and returns the first segment from the path.
        Returns:
        the first segment, or null if the path is empty
      • removeLast

        public NodePathSegment removeLast()
        Removes and returns the last segment from the path.
        Returns:
        the last segment, or null if the path is empty
      • getFirstSegment

        public NodePathSegment getFirstSegment()
        Returns the first segment in the path without removing it.
        Returns:
        the first segment, or null if the path is empty
      • toString

        public String toString​(boolean escaped)
      • parse

        public static NodePath parse​(String path)
        Parses a stringified node path and returns an instance. Returns null if the path cannot be parsed.
        Parameters:
        path -