@Override
  public E remove(int index) throws IndexOutOfBoundsException {
    E oldValue;
    while (true) {
      Object[] elements = get();
      Object[] newElements = createArrayRemove(elements, index);
      if (replaceArray(elements, newElements)) {
        oldValue = get(elements, index);
        break;
      }
    }
    return oldValue;
  }
@Override
  public E remove(int index)