/** * Takes the current path and adds a new segment to it, returning a new path * * @param segment the int path segment to add * * @return a new path containing that segment */ public ExecutionPath segment(int segment) { return new ExecutionPath(this, new IntPathSegment(segment)); }
/** * Takes the current path and adds a new segment to it, returning a new path * * @param segment the string path segment to add * * @return a new path containing that segment */ public ExecutionPath segment(String segment) { return new ExecutionPath(this, new StringPathSegment(segment)); }
public ExecutionPath sibling(String siblingField) { Assert.assertTrue(!ROOT_PATH.equals(this), "You MUST not call this with the root path"); return new ExecutionPath(this.parent, new StringPathSegment(siblingField)); }
/** * Takes the current path and adds a new segment to it, returning a new path * * @param segment the string path segment to add * * @return a new path containing that segment */ public ExecutionPath segment(String segment) { return new ExecutionPath(this, new StringPathSegment(segment)); }
/** * Takes the current path and adds a new segment to it, returning a new path * * @param segment the int path segment to add * * @return a new path containing that segment */ public ExecutionPath segment(int segment) { return new ExecutionPath(this, new IntPathSegment(segment)); }
public ExecutionPath sibling(String siblingField) { Assert.assertTrue(!ROOT_PATH.equals(this), "You MUST not call this with the root path"); return new ExecutionPath(this.parent, new StringPathSegment(siblingField)); }