/** * 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); } }