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

Comparing jsr166/src/main/java/util/LinkedList.java (file contents):
Revision 1.36 by jsr166, Sat Jun 18 01:56:01 2005 UTC vs.
Revision 1.37 by jsr166, Mon Jul 18 01:14:34 2005 UTC

# Line 6 | Line 6
6   */
7  
8   package java.util;
9 < import java.util.*; // for javadoc
9 > import java.util.*; // for javadoc (till 6280605 is fixed)
10  
11   /**
12   * Linked list implementation of the <tt>List</tt> interface.  Implements all
# Line 26 | Line 26 | import java.util.*; // for javadoc
26   * list.  Operations that index into the list will traverse the list from
27   * the beginning or the end, whichever is closer to the specified index.<p>
28   *
29 < * <b>Note that this implementation is not synchronized.</b> If multiple
30 < * threads access a list concurrently, and at least one of the threads
31 < * modifies the list structurally, it <i>must</i> be synchronized
32 < * externally.  (A structural modification is any operation that adds or
33 < * deletes one or more elements; merely setting the value of an element is not
34 < * a structural modification.)  This is typically accomplished by
35 < * synchronizing on some object that naturally encapsulates the list.  If no
36 < * such object exists, the list should be "wrapped" using the
37 < * Collections.synchronizedList method.  This is best done at creation time,
38 < * to prevent accidental unsynchronized access to the list: <pre>
39 < *     List list = Collections.synchronizedList(new LinkedList(...));
40 < * </pre>
29 > * <p><strong>Note that this implementation is not synchronized.</strong>
30 > * If multiple threads access a linked list concurrently, and at least
31 > * one of the threads modifies the list structurally, it <i>must</i> be
32 > * synchronized externally.  (A structural modification is any operation
33 > * that adds or deletes one or more elements; merely setting the value of
34 > * an element is not a structural modification.)  This is typically
35 > * accomplished by synchronizing on some object that naturally
36 > * encapsulates the list.
37 > *
38 > * If no such object exists, the list should be "wrapped" using the
39 > * {@link Collections#synchronizedList Collections.synchronizedList}
40 > * method.  This is best done at creation time, to prevent accidental
41 > * unsynchronized access to the list:<pre>
42 > *   List list = Collections.synchronizedList(new LinkedList(...));</pre>
43   *
44   * <p>The iterators returned by this class's <tt>iterator</tt> and
45   * <tt>listIterator</tt> methods are <i>fail-fast</i>: if the list is
# Line 66 | Line 68 | import java.util.*; // for javadoc
68   * @see     List
69   * @see     ArrayList
70   * @see     Vector
69 * @see     Collections#synchronizedList(List)
71   * @since 1.2
72   * @param <E> the type of elements held in this collection
73   */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines