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.63 by jsr166, Tue Mar 7 07:11:39 2006 UTC vs.
Revision 1.65 by jsr166, Sun May 28 23:36:29 2006 UTC

# Line 52 | Line 52 | package java.util;
52   * ({@code peek}, {@code element}, and {@code size}).
53   *
54   * <p>This class is a member of the
55 < * <a href="{@docRoot}/../guide/collections/index.html">
55 > * <a href="{@docRoot}/../technotes/guides/collections/index.html">
56   * Java Collections Framework</a>.
57   *
58   * @since 1.5
# Line 688 | Line 688 | public class PriorityQueue<E> extends Ab
688          // Write out array length, for compatibility with 1.5 version
689          s.writeInt(Math.max(2, size + 1));
690  
691 <        // Write out all elements in the proper order.
691 >        // Write out all elements in the "proper order".
692          for (int i = 0; i < size; i++)
693              s.writeObject(queue[i]);
694      }
# Line 709 | Line 709 | public class PriorityQueue<E> extends Ab
709  
710          queue = new Object[size];
711  
712 <        // Read in all elements in the proper order.
712 >        // Read in all elements.
713          for (int i = 0; i < size; i++)
714              queue[i] = s.readObject();
715 +
716 +        // Elements are guaranteed to be in "proper order", but the
717 +        // spec has never explained what that might be.
718 +        heapify();
719      }
720   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines