public void removeIndex(int n) {
    if (n >= size) {
      throw new IndexOutOfBoundsException("n >= size()");
    }

    System.arraycopy(values, n + 1, values, n, size - n - 1);
    size--;

    // sort status is unchanged
  }
Removes an element at a given index, shifting elements at greater indicies down one.

@param n {@code >=0, < size();} index of element to remove
android/android_framework/dex-maker/src/main/java/com/android/dx/util/IntList.java