101 |
|
/** |
102 |
|
* Constructs an empty list with the specified initial capacity. |
103 |
|
* |
104 |
< |
* @param initialCapacity the initial capacity of the list |
105 |
< |
* @exception IllegalArgumentException if the specified initial capacity |
106 |
< |
* is negative |
104 |
> |
* @param initialCapacity the initial capacity of the list |
105 |
> |
* @throws IllegalArgumentException if the specified initial capacity |
106 |
> |
* is negative |
107 |
|
*/ |
108 |
|
public ArrayList(int initialCapacity) { |
109 |
|
super(); |
175 |
|
* necessary, to ensure that it can hold at least the number of elements |
176 |
|
* specified by the minimum capacity argument. |
177 |
|
* |
178 |
< |
* @param minCapacity the desired minimum capacity |
178 |
> |
* @param minCapacity the desired minimum capacity |
179 |
|
*/ |
180 |
|
public void ensureCapacity(int minCapacity) { |
181 |
|
modCount++; |
184 |
|
} |
185 |
|
|
186 |
|
/** |
187 |
< |
* Increase the capacity of the array. |
188 |
< |
* @param minCapacity the desired minimum capacity |
187 |
> |
* Increases the capacity of the array. |
188 |
> |
* |
189 |
> |
* @param minCapacity the desired minimum capacity |
190 |
|
*/ |
191 |
|
private void growArray(int minCapacity) { |
192 |
|
int oldCapacity = elementData.length; |
349 |
|
return new IndexOutOfBoundsException("Index: " + i + ", Size: " + s); |
350 |
|
} |
351 |
|
|
351 |
– |
// Positional Access Operations |
352 |
– |
|
352 |
|
/** |
353 |
|
* Returns the element at the specified position in this list. |
354 |
|
* |