MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / grow

Method grow

vm/JavaAPI/src/java/util/Vector.java:422–427  ·  view source on GitHub ↗
(int newCapacity)

Source from the content-addressed store, hash-verified

420 }
421
422 private void grow(int newCapacity) {
423 E[] newData = newElementArray(newCapacity);
424 // Assumes elementCount is <= newCapacity
425 System.arraycopy(elementData, 0, newData, 0, elementCount);
426 elementData = newData;
427 }
428
429 /**
430 * JIT optimization

Callers 2

ensureCapacityMethod · 0.95
trimToSizeMethod · 0.95

Calls 2

newElementArrayMethod · 0.95
arraycopyMethod · 0.95

Tested by

no test coverage detected