Returns a value for a new array size, which will always be larger than the old size. The returned value will not exceed the maximum allowed array size. If the maximum is reached, an exception is thrown. @param size old array capacity @return new capacity
(final int size)
| 262 | * @return new capacity |
| 263 | */ |
| 264 | public static int newCapacity(final int size) { |
| 265 | return newCapacity(size, RESIZE_FACTOR); |
| 266 | } |
| 267 | |
| 268 | /** |
| 269 | * Returns a value for a new array size, which will always be larger than the old size. |