[cvs] / jsr166 / src / main / java / util / Vector.java Repository:
ViewVC logotype

Diff of /jsr166/src/main/java/util/Vector.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8, Tue Feb 7 20:54:24 2006 UTC revision 1.9, Sun Mar 19 17:59:39 2006 UTC
# Line 12  Line 12 
12   * objects. Like an array, it contains components that can be   * objects. Like an array, it contains components that can be
13   * accessed using an integer index. However, the size of a   * accessed using an integer index. However, the size of a
14   * <code>Vector</code> can grow or shrink as needed to accommodate   * <code>Vector</code> can grow or shrink as needed to accommodate
15   * adding and removing items after the <code>Vector</code> has been created.<p>   * adding and removing items after the <code>Vector</code> has been created.
16   *   *
17   * Each vector tries to optimize storage management by maintaining a   * <p>Each vector tries to optimize storage management by maintaining a
18   * <code>capacity</code> and a <code>capacityIncrement</code>. The   * <code>capacity</code> and a <code>capacityIncrement</code>. The
19   * <code>capacity</code> is always at least as large as the vector   * <code>capacity</code> is always at least as large as the vector
20   * size; it is usually larger because as components are added to the   * size; it is usually larger because as components are added to the
21   * vector, the vector's storage increases in chunks the size of   * vector, the vector's storage increases in chunks the size of
22   * <code>capacityIncrement</code>. An application can increase the   * <code>capacityIncrement</code>. An application can increase the
23   * capacity of a vector before inserting a large number of   * capacity of a vector before inserting a large number of
24   * components; this reduces the amount of incremental reallocation. <p>   * components; this reduces the amount of incremental reallocation.
25   *   *
26   * As of the Java 2 platform v1.2, this class has been retrofitted to   * <p>The Iterators returned by Vector's iterator and listIterator
  * implement List, so that it becomes a part of Java's collection framework.  
  * Unlike the new collection implementations, Vector is synchronized.<p>  
  *  
  * The Iterators returned by Vector's iterator and listIterator  
27   * methods are <em>fail-fast</em>: if the Vector is structurally modified   * methods are <em>fail-fast</em>: if the Vector is structurally modified
28   * at any time after the Iterator is created, in any way except through the   * at any time after the Iterator is created, in any way except through the
29   * Iterator's own remove or add methods, the Iterator will throw a   * Iterator's own remove or add methods, the Iterator will throw a
# Line 43  Line 39 
39   * throw <tt>ConcurrentModificationException</tt> on a best-effort basis.   * throw <tt>ConcurrentModificationException</tt> on a best-effort basis.
40   * Therefore, it would be wrong to write a program that depended on this   * Therefore, it would be wrong to write a program that depended on this
41   * exception for its correctness:  <i>the fail-fast behavior of iterators   * exception for its correctness:  <i>the fail-fast behavior of iterators
42   * should be used only to detect bugs.</i><p>   * should be used only to detect bugs.</i>
43   *   *
44   * This class is a member of the   * <p>As of the Java 2 platform v1.2, this class was retrofitted to
45   * <a href="{@docRoot}/../guide/collections/index.html">   * implement the {@link List} interface, making it a member of the
46   * Java Collections Framework</a>.   * <a href="{@docRoot}/../guide/collections/index.html"> Java
47     * Collections Framework</a>.  Unlike the new collection
48     * implementations, {@code Vector} is synchronized.
49   *   *
50   * @author  Lee Boynton   * @author  Lee Boynton
51   * @author  Jonathan Payne   * @author  Jonathan Payne

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8