(int arraySize)
| 119 | } |
| 120 | |
| 121 | @VisibleForTesting |
| 122 | static int computeArrayListCapacity(int arraySize) { |
| 123 | checkNonnegative(arraySize, "arraySize"); |
| 124 | |
| 125 | // TODO(kevinb): Figure out the right behavior, and document it |
| 126 | return Ints.saturatedCast(5L + arraySize + (arraySize / 10)); |
| 127 | } |
| 128 | |
| 129 | /** |
| 130 | * Creates a <i>mutable</i> {@code ArrayList} instance containing the given |
no test coverage detected