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

Method grow

lib/java/util/Vector.java:446–452  ·  view source on GitHub ↗
(int newCapacity)

Source from the content-addressed store, hash-verified

444 }
445
446 private void grow(int newCapacity) {
447 E[] newData = newElementArray(newCapacity);
448 // Assumes elementCount is <= newCapacity
449 assert elementCount <= newCapacity;
450 System.arraycopy(elementData, 0, newData, 0, elementCount);
451 elementData = newData;
452 }
453
454 /**
455 * JIT optimization

Callers 2

ensureCapacityMethod · 0.95
trimToSizeMethod · 0.95

Calls 2

newElementArrayMethod · 0.95
arraycopyMethod · 0.95

Tested by

no test coverage detected