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.2 by tim, Sun May 18 18:10:02 2003 UTC vs.
Revision 1.4 by tim, Mon May 19 02:45:07 2003 UTC

# Line 129 | Line 129 | public class PriorityQueue<E> extends Ab
129              initialCapacity = 1;
130          queue = new E[initialCapacity + 1];
131  
132        /* Commented out to compile with generics compiler
133
132          if (initialElements instanceof Sorted) {
133              comparator = ((Sorted)initialElements).comparator();
134              for (Iterator<E> i = initialElements.iterator(); i.hasNext(); )
135                  queue[++size] = i.next();
136          } else {
139        */
140        {
137              comparator = null;
138              for (Iterator<E> i = initialElements.iterator(); i.hasNext(); )
139                  add(i.next());
# Line 412 | Line 408 | public class PriorityQueue<E> extends Ab
408       * @return the comparator associated with this priority queue, or
409       *         <tt>null</tt> if it uses its elements' natural ordering.
410       */
411 <    Comparator comparator() {
411 >    Comparator<E> comparator() {
412          return comparator;
413      }
414   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines