--- jsr166/src/main/java/util/Vector.java 2006/06/25 20:05:33 1.16 +++ jsr166/src/main/java/util/Vector.java 2006/06/26 00:31:07 1.19 @@ -466,18 +466,17 @@ public class Vector *

The index must be a value greater than or equal to {@code 0} * and less than the current size of the vector. * - *

This method is identical in functionality to the set method - * (which is part of the List interface). Note that the set method reverses - * the order of the parameters, to more closely match array usage. Note - * also that the set method returns the old value that was stored at the - * specified position. + *

This method is identical in functionality to the + * {@link #set(int, Object) set(int, E)} + * method (which is part of the {@link List} interface). Note that the + * {@code set} method reverses the order of the parameters, to more closely + * match array usage. Note also that the {@code set} method returns the + * old value that was stored at the specified position. * * @param obj what the component is to be set to * @param index the specified index - * @throws ArrayIndexOutOfBoundsException if the index was invalid - * @see #size() - * @see List - * @see #set(int, java.lang.Object) + * @throws ArrayIndexOutOfBoundsException if the index is out of range + * ({@code index < 0 || index >= size()}) */ public synchronized void setElementAt(E obj, int index) { if (index >= elementCount) { @@ -497,15 +496,14 @@ public class Vector *

The index must be a value greater than or equal to {@code 0} * and less than the current size of the vector. * - *

This method is identical in functionality to the remove method - * (which is part of the List interface). Note that the remove method - * returns the old value that was stored at the specified position. + *

This method is identical in functionality to the {@link #remove(int)} + * method (which is part of the {@link List} interface). Note that the + * {@code remove} method returns the old value that was stored at the + * specified position. * * @param index the index of the object to remove - * @exception ArrayIndexOutOfBoundsException if the index was invalid - * @see #size() - * @see #remove(int) - * @see List + * @throws ArrayIndexOutOfBoundsException if the index is out of range + * ({@code index < 0 || index >= size()}) */ public synchronized void removeElementAt(int index) { modCount++; @@ -536,16 +534,16 @@ public class Vector * index is equal to the current size of the vector, the new element * is appended to the Vector.) * - *

This method is identical in functionality to the add(Object, int) method - * (which is part of the List interface). Note that the add method reverses - * the order of the parameters, to more closely match array usage. + *

This method is identical in functionality to the + * {@link #add(int, Object) add(int, E)} + * method (which is part of the {@link List} interface). Note that the + * {@code add} method reverses the order of the parameters, to more closely + * match array usage. * * @param obj the component to insert * @param index where to insert the new component - * @exception ArrayIndexOutOfBoundsException if the index was invalid - * @see #size() - * @see #add(int, Object) - * @see List + * @throws ArrayIndexOutOfBoundsException if the index is out of range + * ({@code index < 0 || index > size()}) */ public synchronized void insertElementAt(E obj, int index) { modCount++; @@ -564,12 +562,11 @@ public class Vector * increasing its size by one. The capacity of this vector is * increased if its size becomes greater than its capacity. * - *

This method is identical in functionality to the add(Object) method - * (which is part of the List interface). + *

This method is identical in functionality to the + * {@link #add(Object) add(E)} + * method (which is part of the {@link List} interface). * * @param obj the component to be added - * @see #add(Object) - * @see List */ public synchronized void addElement(E obj) { modCount++; @@ -584,14 +581,13 @@ public class Vector * object's index is shifted downward to have an index one smaller * than the value it had previously. * - *

This method is identical in functionality to the remove(Object) - * method (which is part of the List interface). + *

This method is identical in functionality to the + * {@link #remove(Object)} method (which is part of the + * {@link List} interface). * * @param obj the component to be removed * @return {@code true} if the argument was a component of this * vector; {@code false} otherwise. - * @see List#remove(Object) - * @see List */ public synchronized boolean removeElement(Object obj) { modCount++; @@ -604,13 +600,10 @@ public class Vector } /** - * Removes all components from this vector and sets its size to zero.

- * - * This method is identical in functionality to the clear method - * (which is part of the List interface). + * Removes all components from this vector and sets its size to zero. * - * @see #clear - * @see List + *

This method is identical in functionality to the {@link #clear} + * method (which is part of the {@link List} interface). */ public synchronized void removeAllElements() { modCount++; @@ -668,7 +661,7 @@ public class Vector * be stored, if it is big enough; otherwise, a new array of the * same runtime type is allocated for this purpose. * @return an array containing the elements of the Vector - * @throws ArrayStoreException the runtime type of a is not a supertype + * @throws ArrayStoreException if the runtime type of a is not a supertype * of the runtime type of every element in this Vector * @throws NullPointerException if the given array is null * @since 1.2 @@ -692,8 +685,8 @@ public class Vector * * @param index index of the element to return * @return object at the specified index - * @exception ArrayIndexOutOfBoundsException index is out of range (index - * < 0 || index >= size()) + * @throws ArrayIndexOutOfBoundsException if the index is out of range + * ({@code index < 0 || index >= size()}) * @since 1.2 */ public synchronized E get(int index) { @@ -710,8 +703,8 @@ public class Vector * @param index index of the element to replace * @param element element to be stored at the specified position * @return the element previously at the specified position - * @exception ArrayIndexOutOfBoundsException index out of range - * (index < 0 || index >= size()) + * @throws ArrayIndexOutOfBoundsException if the index is out of range + * ({@code index < 0 || index >= size()}) * @since 1.2 */ public synchronized E set(int index, E element) { @@ -759,8 +752,8 @@ public class Vector * * @param index index at which the specified element is to be inserted * @param element element to be inserted - * @exception ArrayIndexOutOfBoundsException index is out of range - * (index < 0 || index > size()) + * @throws ArrayIndexOutOfBoundsException if the index is out of range + * ({@code index < 0 || index > size()}) * @since 1.2 */ public void add(int index, E element) { @@ -772,8 +765,8 @@ public class Vector * Shifts any subsequent elements to the left (subtracts one from their * indices). Returns the element that was removed from the Vector. * - * @exception ArrayIndexOutOfBoundsException index out of range (index - * < 0 || index >= size()) + * @throws ArrayIndexOutOfBoundsException if the index is out of range + * ({@code index < 0 || index >= size()}) * @param index the index of the element to be removed * @return element that was removed * @since 1.2 @@ -892,8 +885,8 @@ public class Vector * specified collection * @param c elements to be inserted into this Vector * @return {@code true} if this Vector changed as a result of the call - * @exception ArrayIndexOutOfBoundsException index out of range (index - * < 0 || index > size()) + * @throws ArrayIndexOutOfBoundsException if the index is out of range + * ({@code index < 0 || index > size()}) * @throws NullPointerException if the specified collection is null * @since 1.2 */ @@ -1040,7 +1033,7 @@ public class Vector /** * Streamlined specialization of AbstractList version of iterator. - * Locally perfroms bounds checks, but relies on outer Vector + * Locally performs bounds checks, but relies on outer Vector * to access elements under synchronization. */ private final class VectorIterator implements ListIterator { @@ -1168,10 +1161,10 @@ public class Vector * @param fromIndex low endpoint (inclusive) of the subList * @param toIndex high endpoint (exclusive) of the subList * @return a view of the specified range within this List - * @throws IndexOutOfBoundsException endpoint index value out of range - * (fromIndex < 0 || toIndex > size) - * @throws IllegalArgumentException endpoint indices out of order - * (fromIndex > toIndex) + * @throws IndexOutOfBoundsException if an endpoint index value is out of range + * {@code (fromIndex < 0 || toIndex > size)} + * @throws IllegalArgumentException if the endpoint indices are out of order + * {@code (fromIndex > toIndex)} */ public synchronized List subList(int fromIndex, int toIndex) { return new VectorSubList(this, this, fromIndex, fromIndex, toIndex);