Sets the capacity of this ArrayList to be the same as the current size. @see #size
()
| 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$ |
nothing calls this directly
no test coverage detected