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.35 by dl, Fri Jun 10 18:12:59 2005 UTC vs.
Revision 1.36 by dl, Sun Jun 12 11:08:22 2005 UTC

# Line 17 | Line 17 | import java.util.*;
17   * past.  If no delay has expired there is no head and <tt>poll</tt>
18   * will return <tt>null</tt>. Expiration occurs when an element's
19   * <tt>getDelay(TimeUnit.NANOSECONDS)</tt> method returns a value less
20 < * than or equal to zero.  This queue does not permit <tt>null</tt>
20 > * than or equal to zero.  Even though unexpired elements cannot be
21 > * removed using <tt>take</tt> or <tt>poll</tt>, they are otherwise
22 > * treated as normal elements. For example, the <tt>size</tt> method
23 > * returns the count of both expired and unexpired elements.
24 > * This queue does not permit <tt>null</tt>
25   * elements.
26   *
27   * <p>This class and its iterator implement all of the
# Line 218 | Line 222 | public class DelayQueue<E extends Delaye
222      }
223  
224      /**
225 <     * Retrieves, but does not remove, the head of this queue,
226 <     * or returns <tt>null</tt> if this queue is empty.
227 <     * Unlike <tt>poll</tt>, this method can be used to inspect
228 <     * elements that have not yet expired.
225 >     * Retrieves, but does not remove, the head of this queue, or
226 >     * returns <tt>null</tt> if this queue is empty.  Unlike
227 >     * <tt>poll</tt>, if no expired elements are available in the queue,
228 >     * this method returns the element that will expire next,
229 >     * if one exists.
230       *
231       * @return the head of this queue, or <tt>null</tt> if this
232       *         queue is empty.
# Line 406 | Line 411 | public class DelayQueue<E extends Delaye
411  
412      /**
413       * Removes a single instance of the specified element from this
414 <     * queue, if it is present.
414 >     * queue, if it is present, whether or not it has expired.
415       */
416      public boolean remove(Object o) {
417          final ReentrantLock lock = this.lock;
# Line 419 | Line 424 | public class DelayQueue<E extends Delaye
424      }
425  
426      /**
427 <     * Returns an iterator over the elements in this queue. The iterator
428 <     * does not return the elements in any particular order. The
429 <     * returned iterator is a thread-safe "fast-fail" iterator that will
430 <     * throw {@link ConcurrentModificationException}
431 <     * upon detected interference.
427 >     * Returns an iterator over all the elements (both expired and
428 >     * unexpired) in this queue. The iterator does not
429 >     * return the elements in any particular order. The returned
430 >     * iterator is a thread-safe "fast-fail" iterator that will throw
431 >     * {@link ConcurrentModificationException} upon detected
432 >     * interference.
433       *
434       * @return an iterator over the elements in this queue
435       */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines