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

Method trimToSize

vm/JavaAPI/src/java/util/ArrayList.java:643–649  ·  view source on GitHub ↗

Sets the capacity of this ArrayList to be the same as the current size. @see #size

()

Source from the content-addressed store, hash-verified

641 * @see #size
642 */
643 public void trimToSize() {
644 E[] newArray = newElementArray(size);
645 System.arraycopy(array, firstIndex, newArray, 0, size);
646 array = newArray;
647 firstIndex = 0;
648 modCount = 0;
649 }
650}

Callers

nothing calls this directly

Calls 2

newElementArrayMethod · 0.95
arraycopyMethod · 0.95

Tested by

no test coverage detected