Package net.minidev.json.actions.path
Class TreePath
- java.lang.Object
-
- net.minidev.json.actions.path.TreePath
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classTreePath.Step
-
Field Summary
Fields Modifier and Type Field Description protected StringcurrKeyprotected PathDelimiterdelimprotected List<String>keysprotected ListIterator<String>keysItrprotected TreePath.SteplastStepprotected StringBuilderoriginprotected Stringpathprotected StringBuilderremainder
-
Constructor Summary
Constructors Constructor Description TreePath(String path, PathDelimiter delim)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TreePathclone()Stringcurr()booleanequals(Object o)Stringfirst()inthashCode()booleanhasNext()booleanhasPrev()Stringlast()intlength()Stringnext()intnextIndex()Stringorigin()Stringpath()Stringprev()intprevIndex()Stringremainder()voidreset()StringsubPath(int firstIndex, int lastIndex)
-
-
-
Field Detail
-
path
protected final String path
-
keysItr
protected ListIterator<String> keysItr
-
currKey
protected String currKey
-
lastStep
protected TreePath.Step lastStep
-
origin
protected StringBuilder origin
-
remainder
protected StringBuilder remainder
-
delim
protected PathDelimiter delim
-
-
Constructor Detail
-
TreePath
public TreePath(String path, PathDelimiter delim)
-
-
Method Detail
-
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:
clonein classObject- Throws:
CloneNotSupportedException
-
-