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

Comparing jsr166/src/main/java/util/PriorityQueue.java (file contents):
Revision 1.45 by dl, Sun Oct 19 13:38:29 2003 UTC vs.
Revision 1.49 by dl, Thu May 27 11:05:44 2004 UTC

# Line 1 | Line 1
1   /*
2   * %W% %E%
3   *
4 < * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
4 > * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5   * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6   */
7  
# Line 62 | Line 62 | package java.util;
62   * @param <E> the type of elements held in this collection
63   */
64   public class PriorityQueue<E> extends AbstractQueue<E>
65 <    implements Queue<E>, java.io.Serializable {
65 >    implements java.io.Serializable {
66  
67      private static final long serialVersionUID = -7720805057305804111L;
68  
# Line 199 | Line 199 | public class PriorityQueue<E> extends Ab
199      public PriorityQueue(Collection<? extends E> c) {
200          initializeArray(c);
201          if (c instanceof SortedSet) {
202 <            // @fixme double-cast workaround for compiler
203 <            SortedSet<? extends E> s = (SortedSet<? extends E>) (SortedSet)c;
202 >            SortedSet<? extends E> s = (SortedSet<? extends E>)c;
203              comparator = (Comparator<? super E>)s.comparator();
204              fillFromSorted(s);
205          } else if (c instanceof PriorityQueue) {
# Line 326 | Line 325 | public class PriorityQueue<E> extends Ab
325          return offer(o);
326      }
327  
328 +    /**
329 +     * Removes a single instance of the specified element from this
330 +     * collection, if it is present.
331 +     */
332      public boolean remove(Object o) {
333          if (o == null)
334              return false;
# Line 457 | Line 460 | public class PriorityQueue<E> extends Ab
460      }
461  
462      /**
463 <     * Remove all elements from the priority queue.
463 >     * Removes all elements from the priority queue.
464 >     * The queue will be empty after this call returns.
465       */
466      public void clear() {
467          modCount++;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines