@PublicApi public class ExecutionPath extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
ExecutionPath |
append(ExecutionPath path)
Appends the provided path to the current one
|
ExecutionPath |
dropSegment()
Drops the last segment off the path
|
boolean |
equals(java.lang.Object o) |
static ExecutionPath |
fromList(java.util.List<?> objects)
This will create an execution path from the list of objects
|
int |
getLevel() |
ExecutionPath |
getParent() |
ExecutionPath |
getPathWithoutListEnd() |
int |
getSegmentIndex() |
java.lang.String |
getSegmentName() |
java.lang.Object |
getSegmentValue() |
int |
hashCode() |
boolean |
isListSegment() |
boolean |
isNamedSegment() |
boolean |
isRootPath() |
static ExecutionPath |
parse(java.lang.String pathString)
Parses an execution path from the provided path string in the format /segment1/segment2[index]/segmentN
|
ExecutionPath |
replaceSegment(int segment)
Replaces the last segment on the path eg ExecutionPath.parse("/a/b[1]").replaceSegment(9)
equals "/a/b[9]"
|
ExecutionPath |
replaceSegment(java.lang.String segment)
Replaces the last segment on the path eg ExecutionPath.parse("/a/b[1]").replaceSegment("x")
equals "/a/b/x"
|
static ExecutionPath |
rootPath()
All paths start from here
|
ExecutionPath |
segment(int segment)
Takes the current path and adds a new segment to it, returning a new path
|
ExecutionPath |
segment(java.lang.String segment)
Takes the current path and adds a new segment to it, returning a new path
|
java.lang.String |
segmentToString() |
ExecutionPath |
sibling(int siblingField) |
ExecutionPath |
sibling(java.lang.String siblingField) |
java.util.List<java.lang.Object> |
toList() |
java.lang.String |
toString() |
public static ExecutionPath rootPath()
public int getLevel()
public ExecutionPath getPathWithoutListEnd()
public boolean isListSegment()
public boolean isNamedSegment()
public java.lang.String getSegmentName()
public int getSegmentIndex()
public java.lang.Object getSegmentValue()
public ExecutionPath getParent()
public static ExecutionPath parse(java.lang.String pathString)
pathString
- the path stringpublic static ExecutionPath fromList(java.util.List<?> objects)
objects
- the path objectspublic ExecutionPath segment(java.lang.String segment)
segment
- the string path segment to addpublic ExecutionPath segment(int segment)
segment
- the int path segment to addpublic ExecutionPath dropSegment()
public ExecutionPath replaceSegment(int segment)
segment
- the integer segment to usepublic ExecutionPath replaceSegment(java.lang.String segment)
segment
- the string segment to usepublic boolean isRootPath()
rootPath()
public ExecutionPath append(ExecutionPath path)
path
- the path to appendpublic ExecutionPath sibling(java.lang.String siblingField)
public ExecutionPath sibling(int siblingField)
public java.util.List<java.lang.Object> toList()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String segmentToString()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object