73 |
|
* ({@code peek}, {@code element}, and {@code size}). |
74 |
|
* |
75 |
|
* <p>This class is a member of the |
76 |
< |
* <a href="{@docRoot}/../technotes/guides/collections/index.html"> |
76 |
> |
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework"> |
77 |
|
* Java Collections Framework</a>. |
78 |
|
* |
79 |
|
* @since 1.5 |
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 |
|
|