1 |
|
/* |
2 |
|
* %W% %E% |
3 |
|
* |
4 |
< |
* Copyright 2006 Sun Microsystems, Inc. All rights reserved. |
4 |
> |
* Copyright 2007 Sun Microsystems, Inc. All rights reserved. |
5 |
|
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. |
6 |
|
*/ |
7 |
|
|
563 |
|
* increased if its size becomes greater than its capacity. |
564 |
|
* |
565 |
|
* <p>This method is identical in functionality to the |
566 |
< |
* {@link #remove(Object)} method (which is part of the |
567 |
< |
* {@link List} interface). |
566 |
> |
* {@link #add(Object) add(E)} |
567 |
> |
* method (which is part of the {@link List} interface). |
568 |
|
* |
569 |
|
* @param obj the component to be added |
570 |
|
*/ |
581 |
|
* object's index is shifted downward to have an index one smaller |
582 |
|
* than the value it had previously. |
583 |
|
* |
584 |
< |
* <p>This method is identical in functionality to the remove(Object) |
585 |
< |
* method (which is part of the List interface). |
584 |
> |
* <p>This method is identical in functionality to the |
585 |
> |
* {@link #remove(Object)} method (which is part of the |
586 |
> |
* {@link List} interface). |
587 |
|
* |
588 |
|
* @param obj the component to be removed |
589 |
|
* @return {@code true} if the argument was a component of this |
590 |
|
* vector; {@code false} otherwise. |
590 |
– |
* @see List#remove(Object) |
591 |
– |
* @see List |
591 |
|
*/ |
592 |
|
public synchronized boolean removeElement(Object obj) { |
593 |
|
modCount++; |
765 |
|
* Shifts any subsequent elements to the left (subtracts one from their |
766 |
|
* indices). Returns the element that was removed from the Vector. |
767 |
|
* |
768 |
< |
* @exception ArrayIndexOutOfBoundsException index out of range (index |
769 |
< |
* < 0 || index >= size()) |
768 |
> |
* @throws ArrayIndexOutOfBoundsException if the index is out of range |
769 |
> |
* ({@code index < 0 || index >= size()}) |
770 |
|
* @param index the index of the element to be removed |
771 |
|
* @return element that was removed |
772 |
|
* @since 1.2 |
885 |
|
* specified collection |
886 |
|
* @param c elements to be inserted into this Vector |
887 |
|
* @return {@code true} if this Vector changed as a result of the call |
888 |
< |
* @exception ArrayIndexOutOfBoundsException index out of range (index |
889 |
< |
* < 0 || index > size()) |
888 |
> |
* @throws ArrayIndexOutOfBoundsException if the index is out of range |
889 |
> |
* ({@code index < 0 || index > size()}) |
890 |
|
* @throws NullPointerException if the specified collection is null |
891 |
|
* @since 1.2 |
892 |
|
*/ |
1033 |
|
|
1034 |
|
/** |
1035 |
|
* Streamlined specialization of AbstractList version of iterator. |
1036 |
< |
* Locally perfroms bounds checks, but relies on outer Vector |
1036 |
> |
* Locally performs bounds checks, but relies on outer Vector |
1037 |
|
* to access elements under synchronization. |
1038 |
|
*/ |
1039 |
|
private final class VectorIterator implements ListIterator<E> { |
1161 |
|
* @param fromIndex low endpoint (inclusive) of the subList |
1162 |
|
* @param toIndex high endpoint (exclusive) of the subList |
1163 |
|
* @return a view of the specified range within this List |
1164 |
< |
* @throws IndexOutOfBoundsException endpoint index value out of range |
1165 |
< |
* <code>(fromIndex < 0 || toIndex > size)</code> |
1166 |
< |
* @throws IllegalArgumentException endpoint indices out of order |
1167 |
< |
* <code>(fromIndex > toIndex)</code> |
1164 |
> |
* @throws IndexOutOfBoundsException if an endpoint index value is out of range |
1165 |
> |
* {@code (fromIndex < 0 || toIndex > size)} |
1166 |
> |
* @throws IllegalArgumentException if the endpoint indices are out of order |
1167 |
> |
* {@code (fromIndex > toIndex)} |
1168 |
|
*/ |
1169 |
|
public synchronized List<E> subList(int fromIndex, int toIndex) { |
1170 |
|
return new VectorSubList(this, this, fromIndex, fromIndex, toIndex); |