Class TreePath

java.lang.Object
net.minidev.json.actions.path.TreePath

public class TreePath extends Object
TreePath represents an n-gram formatted path corresponding to a branch in a tree of Maps and Lists

See package-info for more details

Author:
adoneitan@gmail.com
  • Field Details

  • Constructor Details

  • Method Details

    • reset

      public void reset()
    • hasNext

      public boolean hasNext()
    • nextIndex

      public int nextIndex()
    • next

      public String next()
    • hasPrev

      public boolean hasPrev()
    • prevIndex

      public int prevIndex()
    • prev

      public String prev()
    • path

      public String path()
      Returns:
      An n-gram path from the first key to the current key (inclusive)
    • origin

      public String origin()
      Returns:
      An n-gram path from the first key to the current key (inclusive)
    • remainder

      public String remainder()
      Returns:
      An n-gram path from the current key to the last key (inclusive)
    • first

      public String first()
      Returns:
      first element in the JSONPath
    • last

      public String last()
      Returns:
      last element in the JSONPath
    • curr

      public String curr()
      Returns:
      current element pointed to by the path iterator
    • length

      public int length()
    • subPath

      public String subPath(int firstIndex, int lastIndex)
    • clone

      public TreePath clone() throws CloneNotSupportedException
      Overrides:
      clone in class Object
      Throws:
      CloneNotSupportedException
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object