code: public final V set(int index, V value) {
      int size = this.size;
      if (index < 0 || index >= size) {
        throw new IndexOutOfBoundsException();
      }
      int valueDataIndex = 1 + (index << 1);
      V result = valueAtDataIndex(valueDataIndex);
      this.data[valueDataIndex] = value;
      return result;
    }
docs: Sets the value at the given index, overriding any existing value mapping.
  
  @return previous value or {@code null} for none
  @throws IndexOutOfBoundsException if index is negative or {@code >=} size