Returns an initial array capacity, which will not exceed #MAX_CAPACITY. @param size size expected result size @return capacity (#INITIAL_CAPACITY is returned if the supplied size value is negative)
(final long size)
| 251 | * @return capacity ({@link #INITIAL_CAPACITY} is returned if the supplied size value is negative) |
| 252 | */ |
| 253 | public static int initialCapacity(final long size) { |
| 254 | return size < 0 ? INITIAL_CAPACITY : (int) Math.min(MAX_CAPACITY, size); |
| 255 | } |
| 256 | |
| 257 | /** |
| 258 | * Returns a value for a new array size, which will always be larger than the old size. |
no test coverage detected