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
(
boolean[] array, int minLength, int padding)
| 232 | |
| 233 | |
| 234 | public static boolean[] ensureCapacity( |
| 235 | boolean[] array, int minLength, int padding) { |
| 236 | checkArgument(minLength >= 0, "Invalid minLength: %s", minLength); |
| 237 | checkArgument(padding >= 0, "Invalid padding: %s", padding); |
| 238 | return (array.length < minLength) ? Arrays.copyOf(array, minLength + padding) : array; |
| 239 | } |
| 240 | |
| 241 | /** |
| 242 | * Returns a string containing the supplied {@code boolean} values separated by {@code separator}. |
nothing calls this directly
no test coverage detected