329 |
|
* |
330 |
|
* @param index index of element to return. |
331 |
|
* @return the element at the specified position in this list. |
332 |
< |
* @throws IndexOutOfBoundsException if index is out of range <tt>(index |
333 |
< |
* < 0 || index >= size())</tt>. |
332 |
> |
* @throws IndexOutOfBoundsException if the index is out of range |
333 |
> |
* (<tt>index < 0 || index > size()</tt>). |
334 |
|
*/ |
335 |
|
public E get(int index) { |
336 |
|
E[] elementData = array(); |
345 |
|
* @param index index of element to replace. |
346 |
|
* @param element element to be stored at the specified position. |
347 |
|
* @return the element previously at the specified position. |
348 |
< |
* @throws IndexOutOfBoundsException if index out of range |
349 |
< |
* <tt>(index < 0 || index >= size())</tt>. |
348 |
> |
* @throws IndexOutOfBoundsException if the index is out of range |
349 |
> |
* (<tt>index < 0 || index > size()</tt>). |
350 |
|
*/ |
351 |
|
public synchronized E set(int index, E element) { |
352 |
|
int len = array.length; |
386 |
|
* |
387 |
|
* @param index index at which the specified element is to be inserted. |
388 |
|
* @param element element to be inserted. |
389 |
< |
* @throws IndexOutOfBoundsException if index is out of range |
390 |
< |
* <tt>(index < 0 || index > size())</tt>. |
389 |
> |
* @throws IndexOutOfBoundsException if the index is out of range |
390 |
> |
* (<tt>index < 0 || index > size()</tt>). |
391 |
|
*/ |
392 |
|
public synchronized void add(int index, E element) { |
393 |
|
int len = array.length; |
408 |
|
* |
409 |
|
* @param index the index of the element to removed. |
410 |
|
* @return the element that was removed from the list. |
411 |
< |
* @throws IndexOutOfBoundsException if index out of range <tt>(index |
412 |
< |
* < 0 || index >= size())</tt>. |
411 |
> |
* @throws IndexOutOfBoundsException if the index is out of range |
412 |
> |
* (<tt>index < 0 || index > size()</tt>). |
413 |
|
*/ |
414 |
|
public synchronized E remove(int index) { |
415 |
|
int len = array.length; |
683 |
|
* @param index index at which to insert first element |
684 |
|
* from the specified collection. |
685 |
|
* @param c elements to be inserted into this list. |
686 |
< |
* @throws IndexOutOfBoundsException if index out of range (index |
687 |
< |
* < 0 || index > size()). |
686 |
> |
* @throws IndexOutOfBoundsException if the index is out of range |
687 |
> |
* (<tt>index < 0 || index > size()</tt>). |
688 |
|
* @return true if any elements are added |
689 |
|
*/ |
690 |
|
public synchronized boolean addAll(int index, Collection<? extends E> c) { |
877 |
|
* @param index index of first element to be returned from the |
878 |
|
* ListIterator (by a call to getNext). |
879 |
|
* @return the iterator |
880 |
< |
* @throws IndexOutOfBoundsException if index is out of range |
881 |
< |
* (index < 0 || index > size()). |
880 |
> |
* @throws IndexOutOfBoundsException if the index is out of range |
881 |
> |
* (<tt>index < 0 || index > size()</tt>). |
882 |
|
*/ |
883 |
|
public ListIterator<E> listIterator(final int index) { |
884 |
|
E[] elementData = array(); |