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

Comparing jsr166/src/main/java/util/concurrent/DelayQueue.java (file contents):
Revision 1.43 by jsr166, Wed Nov 23 05:33:03 2005 UTC vs.
Revision 1.44 by dl, Fri Nov 25 13:29:03 2005 UTC

# Line 426 | Line 426 | public class DelayQueue<E extends Delaye
426  
427      /**
428       * Returns an iterator over all the elements (both expired and
429 <     * unexpired) in this queue. The iterator does not
430 <     * return the elements in any particular order.
429 >     * unexpired) in this queue. The iterator does not return the
430 >     * elements in any particular order.  The returned
431 >     * <tt>Iterator</tt> is a "weakly consistent" iterator that will
432 >     * never throw {@link ConcurrentModificationException}, and
433 >     * guarantees to traverse elements as they existed upon
434 >     * construction of the iterator, and may (but is not guaranteed
435 >     * to) reflect any modifications subsequent to construction.
436       *
437       * @return an iterator over the elements in this queue
438       */
439      public Iterator<E> iterator() {
440 <        return new Itr<E>(toArray());
440 >        return new Itr(toArray());
441      }
442  
443      /**
444       * Snapshot iterator that works off copy of underlying q array.
445       */
446 <    private class Itr<E> implements Iterator<E> {
446 >    private class Itr implements Iterator<E> {
447          final Object[] array; // Array of all elements
448          int cursor;           // index of next element to return;
449          int lastRet;          // index of last element, or -1 if no such

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines