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

Method trimToSize

lib/java/util/ArrayList.java:676–682  ·  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

674 * @see #size
675 */
676 public void trimToSize() {
677 E[] newArray = newElementArray(size);
678 System.arraycopy(array, firstIndex, newArray, 0, size);
679 array = newArray;
680 firstIndex = 0;
681 modCount = 0;
682 }
683
684// private static final ObjectStreamField[] serialPersistentFields = { new ObjectStreamField(
685// "size", Integer.TYPE) }; //$NON-NLS-1$

Callers

nothing calls this directly

Calls 2

newElementArrayMethod · 0.95
arraycopyMethod · 0.95

Tested by

no test coverage detected