Lines Matching defs:minCapacity
213 * {@code minCapacity}, then its capacity is increased by replacing its
219 * is still smaller than {@code minCapacity}, then the new capacity will
220 * be {@code minCapacity}.
222 * @param minCapacity the desired minimum capacity
224 public synchronized void ensureCapacity(int minCapacity) {
225 if (minCapacity > 0) {
227 ensureCapacityHelper(minCapacity);
239 private void ensureCapacityHelper(int minCapacity) {
241 if (minCapacity - elementData.length > 0)
242 grow(minCapacity);
253 private void grow(int minCapacity) {
258 if (newCapacity - minCapacity < 0)
259 newCapacity = minCapacity;
261 newCapacity = hugeCapacity(minCapacity);
265 private static int hugeCapacity(int minCapacity) {
266 if (minCapacity < 0) // overflow
268 return (minCapacity > MAX_ARRAY_SIZE) ?