805 |
|
private int fence; // -1 until first use |
806 |
|
private int expectedModCount; // initialized when fence set |
807 |
|
|
808 |
< |
/** Create new spliterator covering the given range */ |
808 |
> |
/** Creates new spliterator covering the given range */ |
809 |
|
PriorityQueueSpliterator(PriorityQueue<E> pq, int origin, int fence, |
810 |
|
int expectedModCount) { |
811 |
|
this.pq = pq; |
822 |
|
} |
823 |
|
return hi; |
824 |
|
} |
825 |
< |
|
825 |
> |
|
826 |
|
public PriorityQueueSpliterator<E> trySplit() { |
827 |
|
int hi = getFence(), lo = index, mid = (lo + hi) >>> 1; |
828 |
|
return (lo >= mid) ? null : |
829 |
< |
new PriorityQueueSpliterator<E>(pq, lo, index = mid, |
829 |
> |
new PriorityQueueSpliterator<E>(pq, lo, index = mid, |
830 |
|
expectedModCount); |
831 |
|
} |
832 |
|
|
875 |
|
return false; |
876 |
|
} |
877 |
|
|
878 |
< |
public long estimateSize() { |
879 |
< |
return (long) (getFence() - index); |
878 |
> |
public long estimateSize() { |
879 |
> |
return (long) (getFence() - index); |
880 |
|
} |
881 |
|
|
882 |
|
public int characteristics() { |