Returns an array containing the same values as array, but guaranteed to be of a specified minimum length. If array already has a length of at least minLength, it is returned directly. Otherwise, a new array of size minLength + padding is returned, containing the value
(double[] array, int minLength, int padding)
| 332 | |
| 333 | |
| 334 | public static double[] ensureCapacity(double[] array, int minLength, int padding) { |
| 335 | checkArgument(minLength >= 0, "Invalid minLength: %s", minLength); |
| 336 | checkArgument(padding >= 0, "Invalid padding: %s", padding); |
| 337 | return (array.length < minLength) ? Arrays.copyOf(array, minLength + padding) : array; |
| 338 | } |
| 339 | |
| 340 | /** |
| 341 | * Returns a string containing the supplied {@code double} values, converted to strings as |
nothing calls this directly
no test coverage detected