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

Comparing jsr166/src/main/java/util/concurrent/CopyOnWriteArraySet.java (file contents):
Revision 1.15 by dl, Mon Feb 9 13:28:47 2004 UTC vs.
Revision 1.16 by dl, Sat Apr 10 14:25:24 2004 UTC

# Line 16 | Line 16 | import java.util.*;
16   *       stay small, read-only operations
17   *       vastly outnumber mutative operations, and you need
18   *       to prevent interference among threads during traversal.
19 + *  <li>It is thread-safe.
20   *  <li>Mutative operations(add, set, remove, etc) are expensive
21   *      since they usually entail copying the entire underlying array.
22   *  <li>Iterators do not support the mutative remove operation
# Line 44 | Line 45 | import java.util.*;
45   *
46   *    public void update() {
47   *       changeState();
48 < *       Iterator it = handlers.iterator();
48 > *       Iterator&lt;Handler&gt; it = handlers.iterator();
49   *       while (it.hasNext())
50   *          it.next().handle();
51   *    }
52   * }
53   * </pre>
53 * @see CopyOnWriteArrayList
54   *
55   * <p>This class is a member of the
56   * <a href="{@docRoot}/../guide/collections/index.html">
57   * Java Collections Framework</a>.
58   *
59 + * @see CopyOnWriteArrayList
60   * @since 1.5
61   * @author Doug Lea
62   * @param <E> the type of elements held in this collection

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines