private void checkRange(int index) {
    if (index < 0) throw new IndexOutOfBoundsException("index < 0:" + index);
    if (index >= size()) throw new IndexOutOfBoundsException("index: " + index + " >= size: " + size());
  }
private void checkRange(int index)