/** {@inheritDoc} */ @Override public T0 remove(int index) { T0 removed = get(index); tree.remove(index, /*[ COLORED_START ]*/ colors, /*[ COLORED_END ]*/ 1); return removed; }
/** {@inheritDoc} */ @Override public T0 remove(int index) { T0 removed = get(index); tree.remove(index, /*[ COLORED_START ]*/ colors, /*[ COLORED_END ]*/ 1); return removed; }
/** {@inheritDoc} */ @Override public T0 remove(int index) { T0 removed = get(index); tree.remove(index, /*[ COLORED_START ]*/ colors, /*[ COLORED_END ]*/ 1); return removed; }
/** * Replace all values at the specified index with the specified new value. * * <p>Currently this uses a naive implementation of remove then add. If * it proves desirable, it may be worthwhile to optimize this implementation * with one that performs the remove and insert simultaneously, to save * on tree navigation. * * @return the element that was updated. This is non-null unless the size * parameter is 0, in which case the result is always <code>null</code>. */ public Element<T0> set(int index, /*[ COLORED_START ]*/ byte indexColors, byte color, /*[ COLORED_END ]*/ T0 value, int size) { remove(index, /*[ COLORED_START ]*/ indexColors, /*[ COLORED_END ]*/ size); return add(index, /*[ COLORED_START ]*/ indexColors, color, /*[ COLORED_END ]*/ value, size); }
/** * Replace all values at the specified index with the specified new value. * * <p>Currently this uses a naive implementation of remove then add. If * it proves desirable, it may be worthwhile to optimize this implementation * with one that performs the remove and insert simultaneously, to save * on tree navigation. * * @return the element that was updated. This is non-null unless the size * parameter is 0, in which case the result is always <code>null</code>. */ public Element<T0> set(int index, /*[ COLORED_START ]*/ byte indexColors, byte color, /*[ COLORED_END ]*/ T0 value, int size) { remove(index, /*[ COLORED_START ]*/ indexColors, /*[ COLORED_END ]*/ size); return add(index, /*[ COLORED_START ]*/ indexColors, color, /*[ COLORED_END ]*/ value, size); }
/** * Replace all values at the specified index with the specified new value. * * <p>Currently this uses a naive implementation of remove then add. If * it proves desirable, it may be worthwhile to optimize this implementation * with one that performs the remove and insert simultaneously, to save * on tree navigation. * * @return the element that was updated. This is non-null unless the size * parameter is 0, in which case the result is always <code>null</code>. */ public Element<T0> set(int index, /*[ COLORED_START ]*/ byte indexColors, byte color, /*[ COLORED_END ]*/ T0 value, int size) { remove(index, /*[ COLORED_START ]*/ indexColors, /*[ COLORED_END ]*/ size); return add(index, /*[ COLORED_START ]*/ indexColors, color, /*[ COLORED_END ]*/ value, size); }