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

Comparing jsr166/src/main/java/util/ArrayDeque.java (file contents):
Revision 1.71 by jsr166, Sun Sep 20 02:53:40 2015 UTC vs.
Revision 1.73 by jsr166, Sun Oct 11 00:50:06 2015 UTC

# Line 883 | Line 883 | public class ArrayDeque<E> extends Abstr
883          private int fence;  // -1 until first use
884          private int index;  // current index, modified on traverse/split
885  
886 <        /** Creates new spliterator covering the given array and range */
886 >        /** Creates new spliterator covering the given array and range. */
887          DeqSpliterator(ArrayDeque<E> deq, int origin, int fence) {
888              this.deq = deq;
889              this.index = origin;
# Line 899 | Line 899 | public class ArrayDeque<E> extends Abstr
899              return t;
900          }
901  
902 <        public Spliterator<E> trySplit() {
902 >        public DeqSpliterator<E> trySplit() {
903              int t = getFence(), h = index, n = deq.elements.length;
904              if (h != t && ((h + 1) & (n - 1)) != t) {
905                  if (h > t)
906                      t += n;
907                  int m = ((h + t) >>> 1) & (n - 1);
908 <                return new DeqSpliterator<>(deq, h, index = m);
908 >                return new DeqSpliterator<E>(deq, h, index = m);
909              }
910              return null;
911          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines