private void ensureCapacity() {
    if (myStorage.length <= myIndex) {
      int newCapacity = MathUtil.clamp(myStorage.length * 3 / 2, 10, myMaxCapacity);
      myStorage = ArrayUtil.realloc(myStorage, newCapacity, ArrayUtil.OBJECT_ARRAY_FACTORY);
    }
  }
private void ensureCapacity()