public Path(String x) { this(); List<String> s = parse(x); data.append(s); }
/** * Constructs a path with x+y */ public Path(Path x, Path y) { data = new PathRep(x.data); data.append(y.data); }
public Path(String x) { this(); List<String> s = parse(x); data.append(s); }
/** * Constructs a path with x+y */ public Path(Path x, Path y) { data = new PathRep(x.data); data.append(y.data); }
public Path(String x) { this(); List<String> s = parse(x); data.append(s); }
/** * Appends p to the end of this */ public void append(PathRep p) { append(p.segments); resetState(); }
/** * Constructs a path with x+y */ public Path(Path x, Path y) { data = new PathRep(x.data); data.append(y.data); }
/** * Appends p to the end of this */ public void append(PathRep p) { append(p.segments); resetState(); }
/** * Appends p to the end of this */ public void append(PathRep p) { append(p.segments); resetState(); }
/** * Appends x to the end of this */ public MutablePath push(Path x) { if (x == null) { throw new IllegalArgumentException(UtilConstants.ERR_NULL_VALUE_PASSED_TO_PUSH); } own(); getData().append(x.getData()); return this; }
/** * Appends x to the end of this */ public MutablePath push(Path x) { if (x == null) { throw new IllegalArgumentException(UtilConstants.ERR_NULL_VALUE_PASSED_TO_PUSH); } own(); getData().append(x.getData()); return this; }
/** * Appends the given path to the current path segments. * * @param x the new path segments * @return the updated path */ public MutablePath push(String x) { if (x == null) { throw new IllegalArgumentException(UtilConstants.ERR_NULL_VALUE_PASSED_TO_PUSH); } List<String> s = parse(x); if (s != null && !s.isEmpty()) { own(); getData().append(s); } return this; }
/** * Appends the given path to the current path segments. * * @param x the new path segments * @return the updated path */ public MutablePath push(String x) { if (x == null) { throw new IllegalArgumentException(UtilConstants.ERR_NULL_VALUE_PASSED_TO_PUSH); } List<String> s = parse(x); if (s != null && !s.isEmpty()) { own(); getData().append(s); } return this; }
/** * Appends the given path to the current path segments. * * @param x the new path segments * @return the updated path */ public MutablePath push(String x) { if (x == null) { throw new IllegalArgumentException(UtilConstants.ERR_NULL_VALUE_PASSED_TO_PUSH); } List<String> s = parse(x); if (s != null && !s.isEmpty()) { own(); getData().append(s); } return this; }
/** * Appends x to the end of this */ public MutablePath push(Path x) { if (x == null) { throw new IllegalArgumentException(UtilConstants.ERR_NULL_VALUE_PASSED_TO_PUSH); } own(); getData().append(x.getData()); return this; }
/** * Replace the last path segment with the path supplied. * * @param x the new end of the path * @return the updated path */ public Path setLast(String x) { try { own(); getData().remove(getData().size() - 1); getData().append(parse(x)); return this; } catch (IndexOutOfBoundsException e) { throw new IllegalStateException(UtilConstants.ERR_CANT_SET_LAST_SEGMENT_ON_EMPTY_PATH); } }
/** * Replace the last path segment with the path supplied. * * @param x the new end of the path * @return the updated path */ public Path setLast(String x) { try { own(); getData().remove(getData().size() - 1); getData().append(parse(x)); return this; } catch (IndexOutOfBoundsException e) { throw new IllegalStateException(UtilConstants.ERR_CANT_SET_LAST_SEGMENT_ON_EMPTY_PATH); } }
/** * Replace the last path segment with the path supplied. * * @param x the new end of the path * @return the updated path */ public Path setLast(String x) { try { own(); getData().remove(getData().size() - 1); getData().append(parse(x)); return this; } catch (IndexOutOfBoundsException e) { throw new IllegalStateException(UtilConstants.ERR_CANT_SET_LAST_SEGMENT_ON_EMPTY_PATH); } }