68 * {@link Collections#synchronizedList Collections.synchronizedList} |
68 * {@link Collections#synchronizedList Collections.synchronizedList} |
69 * method. This is best done at creation time, to prevent accidental |
69 * method. This is best done at creation time, to prevent accidental |
70 * unsynchronized access to the list:<pre> |
70 * unsynchronized access to the list:<pre> |
71 * List list = Collections.synchronizedList(new ArrayList(...));</pre> |
71 * List list = Collections.synchronizedList(new ArrayList(...));</pre> |
72 * |
72 * |
73 * <p><a name="fail-fast"> |
73 * <p id="fail-fast"> |
74 * The iterators returned by this class's {@link #iterator() iterator} and |
74 * The iterators returned by this class's {@link #iterator() iterator} and |
75 * {@link #listIterator(int) listIterator} methods are <em>fail-fast</em>:</a> |
75 * {@link #listIterator(int) listIterator} methods are <em>fail-fast</em>: |
76 * if the list is structurally modified at any time after the iterator is |
76 * if the list is structurally modified at any time after the iterator is |
77 * created, in any way except through the iterator's own |
77 * created, in any way except through the iterator's own |
78 * {@link ListIterator#remove() remove} or |
78 * {@link ListIterator#remove() remove} or |
79 * {@link ListIterator#add(Object) add} methods, the iterator will throw a |
79 * {@link ListIterator#add(Object) add} methods, the iterator will throw a |
80 * {@link ConcurrentModificationException}. Thus, in the face of |
80 * {@link ConcurrentModificationException}. Thus, in the face of |