public void trimToSize() {
    int size = mySize;
    if (size < 2) return;
    Object[] array = asArray();
    if (size < array.length) {
      modCount++;
      myElem = Arrays.copyOf(array, size);
    }
  }
public void trimToSize()