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.55 by dl, Mon May 27 13:04:51 2013 UTC vs.
Revision 1.56 by jsr166, Thu Aug 8 15:13:34 2013 UTC

# Line 376 | Line 376 | public class CopyOnWriteArraySet<E> exte
376          al.forEach(action);
377      }
378  
379 +    /**
380 +     * Returns a {@link Spliterator} over the elements in this set in the order
381 +     * in which these elements were added.
382 +     *
383 +     * <p>The {@code Spliterator} reports {@link Spliterator#IMMUTABLE},
384 +     * {@link Spliterator#DISTINCT}, {@link Spliterator#SIZED}, and
385 +     * {@link Spliterator#SUBSIZED}.
386 +     *
387 +     * <p>The spliterator provides a snapshot of the state of the set
388 +     * when the spliterator was constructed. No synchronization is needed while
389 +     * operating on the spliterator. The spliterator does <em>NOT</em> support
390 +     * the {@code remove}, {@code set} or {@code add} methods.
391 +     *
392 +     * @return a {@code Spliterator} over the elements in this set
393 +     * @since 1.8
394 +     */
395      public Spliterator<E> spliterator() {
396          return Spliterators.spliterator
397              (al.getArray(), Spliterator.IMMUTABLE | Spliterator.DISTINCT);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines