equal
deleted
inserted
replaced
793 // Elements are guaranteed to be in "proper order", but the |
793 // Elements are guaranteed to be in "proper order", but the |
794 // spec has never explained what that might be. |
794 // spec has never explained what that might be. |
795 heapify(); |
795 heapify(); |
796 } |
796 } |
797 |
797 |
|
798 /** |
|
799 * Creates a <em><a href="Spliterator.html#binding">late-binding</a></em> |
|
800 * and <em>fail-fast</em> {@link Spliterator} over the elements in this |
|
801 * queue. |
|
802 * |
|
803 * <p>The {@code Spliterator} reports {@link Spliterator#SIZED}, |
|
804 * {@link Spliterator#SUBSIZED}, and {@link Spliterator#NONNULL}. |
|
805 * Overriding implementations should document the reporting of additional |
|
806 * characteristic values. |
|
807 * |
|
808 * @return a {@code Spliterator} over the elements in this queue |
|
809 * @since 1.8 |
|
810 */ |
798 public final Spliterator<E> spliterator() { |
811 public final Spliterator<E> spliterator() { |
799 return new PriorityQueueSpliterator<E>(this, 0, -1, 0); |
812 return new PriorityQueueSpliterator<E>(this, 0, -1, 0); |
800 } |
813 } |
801 |
814 |
802 static final class PriorityQueueSpliterator<E> implements Spliterator<E> { |
815 static final class PriorityQueueSpliterator<E> implements Spliterator<E> { |