equal
deleted
inserted
replaced
247 * Verify that the capacity is nonnegative. |
247 * Verify that the capacity is nonnegative. |
248 * |
248 * |
249 * @param capacity |
249 * @param capacity |
250 * The new buffer's capacity, in $type$s |
250 * The new buffer's capacity, in $type$s |
251 * |
251 * |
252 * @throws IllegalArgumentException |
252 * @throws IllegalArgumentException |
253 * If the {@code capacity} is a negative integer |
253 * If the {@code capacity} is a negative integer |
254 */ |
254 */ |
255 static IllegalArgumentException createCapacityException(int capacity) { |
255 static IllegalArgumentException createCapacityException(int capacity) { |
256 assert capacity < 0 : "capacity expected to be negative"; |
256 assert capacity < 0 : "capacity expected to be negative"; |
257 return new IllegalArgumentException("capacity < 0: (" |
257 return new IllegalArgumentException("capacity < 0: (" |
258 + capacity + " < 0)"); |
258 + capacity + " < 0)"); |