[cvs] / jsr166 / src / main / java / util / PriorityQueue.java Repository:
ViewVC logotype

Diff of /jsr166/src/main/java/util/PriorityQueue.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.93, Tue Feb 26 17:28:00 2013 UTC revision 1.94, Wed Mar 13 12:38:56 2013 UTC
# Line 783  Line 783 
783          heapify();          heapify();
784      }      }
785    
786      final Spliterator<E> spliterator() {      public Spliterator<E> spliterator() {
787          return new PriorityQueueSpliterator<E>(this, 0, -1, 0);          return new PriorityQueueSpliterator<E>(this, 0, -1, 0);
788      }      }
789    
     public Stream<E> stream() {  
         return Streams.stream(spliterator());  
     }  
   
     public Stream<E> parallelStream() {  
         return Streams.parallelStream(spliterator());  
     }  
   
790      /**      /**
791       * This is very similar to ArrayList Spliterator, except for extra       * This is very similar to ArrayList Spliterator, except for extra
792       * null checks.       * null checks.
# Line 823  Line 815 
815              return hi;              return hi;
816          }          }
817    
818          public PriorityQueueSpliterator<E> trySplit() {          public Spliterator<E> trySplit() {
819              int hi = getFence(), lo = index, mid = (lo + hi) >>> 1;              int hi = getFence(), lo = index, mid = (lo + hi) >>> 1;
820              return (lo >= mid) ? null :              return (lo >= mid) ? null :
821                  new PriorityQueueSpliterator<E>(pq, lo, index = mid,                  new PriorityQueueSpliterator<E>(pq, lo, index = mid,

Legend:
Removed from v.1.93  
changed lines
  Added in v.1.94

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8