ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/PriorityQueue.java
(Generate patch)

Comparing jsr166/src/main/java/util/PriorityQueue.java (file contents):
Revision 1.81 by dl, Wed Jan 16 15:06:10 2013 UTC vs.
Revision 1.84 by jsr166, Sat Jan 19 18:11:56 2013 UTC

# Line 60 | Line 60 | import java.util.function.Block;
60   * the priority queue in any particular order. If you need ordered
61   * traversal, consider using {@code Arrays.sort(pq.toArray())}.
62   *
63 < * <p> <strong>Note that this implementation is not synchronized.</strong>
63 > * <p><strong>Note that this implementation is not synchronized.</strong>
64   * Multiple threads should not access a {@code PriorityQueue}
65   * instance concurrently if any of the threads modifies the queue.
66   * Instead, use the thread-safe {@link
# Line 451 | Line 451 | public class PriorityQueue<E> extends Ab
451       *         this queue
452       * @throws NullPointerException if the specified array is null
453       */
454 +    @SuppressWarnings("unchecked")
455      public <T> T[] toArray(T[] a) {
456          if (a.length < size)
457              // Make a new array of a's runtime type, but my contents:
# Line 783 | Line 784 | public class PriorityQueue<E> extends Ab
784      }
785  
786      // wrapping constructor in method avoids transient javac problems
787 <    final PriorityQueueSpliterator<E> spliterator(int origin, int fence,
787 >    final PriorityQueueSpliterator<E> spliterator(int origin, int fence,
788                                                    int expectedModCount) {
789 <        return new PriorityQueueSpliterator(this, origin, fence,
790 <                                            expectedModCount);
789 >        return new PriorityQueueSpliterator<E>(this, origin, fence,
790 >                                               expectedModCount);
791      }
792  
793      public Stream<E> stream() {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines