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

Comparing jsr166/src/main/java/util/concurrent/CopyOnWriteArrayList.java (file contents):
Revision 1.112 by jsr166, Thu Jul 18 18:21:22 2013 UTC vs.
Revision 1.113 by jsr166, Thu Aug 8 15:13:34 2013 UTC

# Line 1089 | Line 1089 | public class CopyOnWriteArrayList<E>
1089          return new COWIterator<E>(elements, index);
1090      }
1091  
1092 +    /**
1093 +     * Returns a {@link Spliterator} over the elements in this list.
1094 +     *
1095 +     * <p>The {@code Spliterator} reports {@link Spliterator#IMMUTABLE},
1096 +     * {@link Spliterator#ORDERED}, {@link Spliterator#SIZED}, and
1097 +     * {@link Spliterator#SUBSIZED}.
1098 +     *
1099 +     * <p>The spliterator provides a snapshot of the state of the list
1100 +     * when the spliterator was constructed. No synchronization is needed while
1101 +     * operating on the spliterator. The spliterator does <em>NOT</em> support
1102 +     * the {@code remove}, {@code set} or {@code add} methods.
1103 +     *
1104 +     * @return a {@code Spliterator} over the elements in this list
1105 +     * @since 1.8
1106 +     */
1107      public Spliterator<E> spliterator() {
1108          return Spliterators.spliterator
1109              (getArray(), Spliterator.IMMUTABLE | Spliterator.ORDERED);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines