@SuppressWarnings("unchecked")
  void set(int index, T value) {
    if (array == null) {
      array = (T[])new Object[Math.max(index + 1, INITIAL_SIZE)];
    }
    else if (index >= array.length) {
      array = Arrays.copyOf(array, Math.max(index + 1, array.length * 2));
    }
    array[index] = value;
  }
@SuppressWarnings("unchecked")
  void set(int index, T value)