ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/Vector.java
(Generate patch)

Comparing jsr166/src/main/java/util/Vector.java (file contents):
Revision 1.17 by jsr166, Mon Jun 26 00:17:48 2006 UTC vs.
Revision 1.21 by jsr166, Sun May 20 07:54:01 2007 UTC

# Line 1 | Line 1
1   /*
2 < * %W% %E%
2 > * Copyright 1994-2006 Sun Microsystems, Inc.  All Rights Reserved.
3 > * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4   *
5 < * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
6 < * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
5 > * This code is free software; you can redistribute it and/or modify it
6 > * under the terms of the GNU General Public License version 2 only, as
7 > * published by the Free Software Foundation.  Sun designates this
8 > * particular file as subject to the "Classpath" exception as provided
9 > * by Sun in the LICENSE file that accompanied this code.
10 > *
11 > * This code is distributed in the hope that it will be useful, but WITHOUT
12 > * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 > * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14 > * version 2 for more details (a copy is included in the LICENSE file that
15 > * accompanied this code).
16 > *
17 > * You should have received a copy of the GNU General Public License version
18 > * 2 along with this work; if not, write to the Free Software Foundation,
19 > * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 > *
21 > * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
22 > * CA 95054 USA or visit www.sun.com if you need additional information or
23 > * have any questions.
24   */
25  
26   package java.util;
# Line 563 | Line 581 | public class Vector<E>
581       * increased if its size becomes greater than its capacity.
582       *
583       * <p>This method is identical in functionality to the
584 <     * {@link #remove(Object)} method (which is part of the
585 <     * {@link List} interface).
584 >     * {@link #add(Object) add(E)}
585 >     * method (which is part of the {@link List} interface).
586       *
587       * @param   obj   the component to be added
588       */
# Line 581 | Line 599 | public class Vector<E>
599       * object's index is shifted downward to have an index one smaller
600       * than the value it had previously.
601       *
602 <     * <p>This method is identical in functionality to the remove(Object)
603 <     * method (which is part of the List interface).
602 >     * <p>This method is identical in functionality to the
603 >     * {@link #remove(Object)} method (which is part of the
604 >     * {@link List} interface).
605       *
606       * @param   obj   the component to be removed
607       * @return  {@code true} if the argument was a component of this
608       *          vector; {@code false} otherwise.
590     * @see     List#remove(Object)
591     * @see     List
609       */
610      public synchronized boolean removeElement(Object obj) {
611          modCount++;
# Line 766 | Line 783 | public class Vector<E>
783       * Shifts any subsequent elements to the left (subtracts one from their
784       * indices).  Returns the element that was removed from the Vector.
785       *
786 <     * @exception ArrayIndexOutOfBoundsException index out of range (index
787 <     *            &lt; 0 || index &gt;= size())
786 >     * @throws ArrayIndexOutOfBoundsException if the index is out of range
787 >     *         ({@code index < 0 || index >= size()})
788       * @param index the index of the element to be removed
789       * @return element that was removed
790       * @since 1.2
# Line 886 | Line 903 | public class Vector<E>
903       *              specified collection
904       * @param c elements to be inserted into this Vector
905       * @return {@code true} if this Vector changed as a result of the call
906 <     * @exception ArrayIndexOutOfBoundsException index out of range (index
907 <     *            &lt; 0 || index &gt; size())
906 >     * @throws ArrayIndexOutOfBoundsException if the index is out of range
907 >     *         ({@code index < 0 || index > size()})
908       * @throws NullPointerException if the specified collection is null
909       * @since 1.2
910       */
# Line 1034 | Line 1051 | public class Vector<E>
1051  
1052      /**
1053       * Streamlined specialization of AbstractList version of iterator.
1054 <     * Locally perfroms bounds checks, but relies on outer Vector
1054 >     * Locally performs bounds checks, but relies on outer Vector
1055       * to access elements under synchronization.
1056       */
1057      private final class VectorIterator implements ListIterator<E> {
# Line 1162 | Line 1179 | public class Vector<E>
1179       * @param fromIndex low endpoint (inclusive) of the subList
1180       * @param toIndex high endpoint (exclusive) of the subList
1181       * @return a view of the specified range within this List
1182 <     * @throws IndexOutOfBoundsException endpoint index value out of range
1183 <     *         <code>(fromIndex &lt; 0 || toIndex &gt; size)</code>
1184 <     * @throws IllegalArgumentException endpoint indices out of order
1185 <     *         <code>(fromIndex &gt; toIndex)</code>
1182 >     * @throws IndexOutOfBoundsException if an endpoint index value is out of range
1183 >     *         {@code (fromIndex < 0 || toIndex > size)}
1184 >     * @throws IllegalArgumentException if the endpoint indices are out of order
1185 >     *         {@code (fromIndex > toIndex)}
1186       */
1187      public synchronized List<E> subList(int fromIndex, int toIndex) {
1188          return new VectorSubList(this, this, fromIndex, fromIndex, toIndex);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines