MCPcopy Create free account
hub / github.com/davidgiven/luje / ensureCapacity

Method ensureCapacity

lib/java/util/Vector.java:369–376  ·  view source on GitHub ↗

Ensures that this vector can hold the specified number of elements without growing. @param minimumCapacity the minimum number of elements that this vector will hold before growing. @see #capacity

(int minimumCapacity)

Source from the content-addressed store, hash-verified

367 * @see #capacity
368 */
369 public synchronized void ensureCapacity(int minimumCapacity) {
370 if (elementData.length < minimumCapacity) {
371 int next = (capacityIncrement <= 0 ? elementData.length
372 : capacityIncrement)
373 + elementData.length;
374 grow(minimumCapacity > next ? minimumCapacity : next);
375 }
376 }
377
378 /**
379 * Compares the specified object to this vector and returns if they are

Callers 1

setSizeMethod · 0.95

Calls 1

growMethod · 0.95

Tested by

no test coverage detected