[cvs] / jsr166 / src / main / java / util / PriorityQueue.java Repository:
ViewVC logotype

Diff of /jsr166/src/main/java/util/PriorityQueue.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3, Sun May 18 20:36:01 2003 UTC revision 1.4, Mon May 19 02:45:07 2003 UTC
# Line 129  Line 129 
129              initialCapacity = 1;              initialCapacity = 1;
130          queue = new E[initialCapacity + 1];          queue = new E[initialCapacity + 1];
131    
         /* Commented out to compile with generics compiler  
   
132          if (initialElements instanceof Sorted) {          if (initialElements instanceof Sorted) {
133              comparator = ((Sorted)initialElements).comparator();              comparator = ((Sorted)initialElements).comparator();
134              for (Iterator<E> i = initialElements.iterator(); i.hasNext(); )              for (Iterator<E> i = initialElements.iterator(); i.hasNext(); )
135                  queue[++size] = i.next();                  queue[++size] = i.next();
136          } else {          } else {
         */  
         {  
137              comparator = null;              comparator = null;
138              for (Iterator<E> i = initialElements.iterator(); i.hasNext(); )              for (Iterator<E> i = initialElements.iterator(); i.hasNext(); )
139                  add(i.next());                  add(i.next());

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8