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 |
|
|
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) { |
829 |
|
this.pq = pq; |