public Path set(int i, String x) { own(); getData().set(i, x); return this; }
public Path set(int i, String x) { own(); getData().set(i, x); return this; }
/** * Sets the path to empty path */ public MutablePath clear() { own(); getData().clear(); return this; }
public Path set(int i, String x) { own(); getData().set(i, x); return this; }
/** * Sets the path to empty path */ public MutablePath clear() { own(); getData().clear(); return this; }
/** * Sets the path to empty path */ public MutablePath clear() { own(); getData().clear(); 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 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; }
/** * Remove the last path segment from this path. * * @return the updated path */ public MutablePath pop() { try { own(); getData().remove(getData().size() - 1); } catch (IndexOutOfBoundsException e) { throw new IllegalStateException(UtilConstants.ERR_CANT_POP_EMPTY_PATH); } return this; }
/** * Remove the last path segment from this path. * * @return the updated path */ public MutablePath pop() { try { own(); getData().remove(getData().size() - 1); } catch (IndexOutOfBoundsException e) { throw new IllegalStateException(UtilConstants.ERR_CANT_POP_EMPTY_PATH); } return this; }
/** * Remove the last path segment from this path. * * @return the updated path */ public MutablePath pop() { try { own(); getData().remove(getData().size() - 1); } catch (IndexOutOfBoundsException e) { throw new IllegalStateException(UtilConstants.ERR_CANT_POP_EMPTY_PATH); } return this; }
/** * Reduces the length of the path to the given length */ public MutablePath cut(int length) { own(); int l = getData().size(); while (l > length) { getData().remove(--l); } return this; }
/** * Reduces the length of the path to the given length */ public MutablePath cut(int length) { own(); int l = getData().size(); while (l > length) { getData().remove(--l); } return this; }
/** * Reduces the length of the path to the given length */ public MutablePath cut(int length) { own(); int l = getData().size(); while (l > length) { getData().remove(--l); } 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); } }