/** * Checks if we need to expand, and expands if necessary. */ protected void expandIfNecessary() { if (size > this.threshold && capacity < MAX_ARRAY_LENGTH) { resize(capacity * 2); } } }
/** * Checks if we need to expand, and expands if necessary. */ protected void expandIfNecessary() { if (size > this.threshold && capacity < MAX_ARRAY_LENGTH) { resize(capacity * 2); } } }