Reduces the size of the backing array to the size of the actual items. This is useful to release memory when many items have been removed, or if it is known that more items will not be added. @return #items
()
| 459 | * have been removed, or if it is known that more items will not be added. |
| 460 | * @return {@link #items} */ |
| 461 | public T[] shrink () { |
| 462 | if (items.length != size) resize(size); |
| 463 | return items; |
| 464 | } |
| 465 | |
| 466 | /** Increases the size of the backing array to accommodate the specified number of additional items. Useful before adding many |
| 467 | * items to avoid multiple backing array resizes. |
no test coverage detected