522 |
|
*/ |
523 |
|
private int expectedModCount = modCount; |
524 |
|
|
525 |
+ |
Itr() {} // prevent access constructor creation |
526 |
+ |
|
527 |
|
public boolean hasNext() { |
528 |
|
return cursor < size || |
529 |
|
(forgetMeNot != null && !forgetMeNot.isEmpty()); |
734 |
|
@SuppressWarnings("unchecked") |
735 |
|
private void heapify() { |
736 |
|
final Object[] es = queue; |
737 |
< |
final int half = (size >>> 1) - 1; |
737 |
> |
int i = (size >>> 1) - 1; |
738 |
|
if (comparator == null) |
739 |
< |
for (int i = half; i >= 0; i--) |
739 |
> |
for (; i >= 0; i--) |
740 |
|
siftDownComparable(i, (E) es[i]); |
741 |
|
else |
742 |
< |
for (int i = half; i >= 0; i--) |
742 |
> |
for (; i >= 0; i--) |
743 |
|
siftDownUsingComparator(i, (E) es[i]); |
744 |
|
} |
745 |
|
|