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.106 by jsr166, Tue Jun 16 23:06:01 2015 UTC vs.
Revision 1.109 by jsr166, Wed Jun 1 16:08:04 2016 UTC

# Line 99 | Line 99 | public class PriorityQueue<E> extends Ab
99      /**
100       * The number of elements in the priority queue.
101       */
102 <    private int size;
102 >    int size;
103  
104      /**
105       * The comparator, or null if priority queue uses elements'
# Line 337 | Line 337 | public class PriorityQueue<E> extends Ab
337          int i = size;
338          if (i >= queue.length)
339              grow(i + 1);
340 +        siftUp(i, e);
341          size = i + 1;
341        if (i == 0)
342            queue[0] = e;
343        else
344            siftUp(i, e);
342          return true;
343      }
344  
# Line 609 | Line 606 | public class PriorityQueue<E> extends Ab
606       * avoid missing traversing elements.
607       */
608      @SuppressWarnings("unchecked")
609 <    private E removeAt(int i) {
609 >    E removeAt(int i) {
610          // assert i >= 0 && i < size;
611          modCount++;
612          int s = --size;
# Line 826 | Line 823 | public class PriorityQueue<E> extends Ab
823          private int fence;            // -1 until first use
824          private int expectedModCount; // initialized when fence set
825  
826 <        /** Creates new spliterator covering the given range */
826 >        /** Creates new spliterator covering the given range. */
827          PriorityQueueSpliterator(PriorityQueue<E> pq, int origin, int fence,
828 <                             int expectedModCount) {
828 >                                 int expectedModCount) {
829              this.pq = pq;
830              this.index = origin;
831              this.fence = fence;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines