(int minimumCapacity)
| 381 | /// |
| 382 | /// - #capacity |
| 383 | public synchronized void ensureCapacity(int minimumCapacity) { |
| 384 | if (elementData.length < minimumCapacity) { |
| 385 | int next = (capacityIncrement <= 0 ? elementData.length |
| 386 | : capacityIncrement) |
| 387 | + elementData.length; |
| 388 | grow(minimumCapacity > next ? minimumCapacity : next); |
| 389 | } |
| 390 | } |
| 391 | |
| 392 | /// Compares the specified object to this vector and returns if they are |
| 393 | /// equal. The object must be a List which contains the same objects in the |