changeset 6401:dd7327fe3467

Remove Sink.accept and defer to Block.apply.
author psandoz
date Wed, 14 Nov 2012 22:18:13 +0100
parents 507817d66484
children 9b7246d917a1
files src/share/classes/java/util/Arrays.java src/share/classes/java/util/streams/Sink.java src/share/classes/java/util/streams/ops/ConcatOp.java src/share/classes/java/util/streams/ops/CumulateOp.java src/share/classes/java/util/streams/ops/FilterOp.java src/share/classes/java/util/streams/ops/FlatMapOp.java src/share/classes/java/util/streams/ops/FoldOp.java src/share/classes/java/util/streams/ops/ForEachOp.java src/share/classes/java/util/streams/ops/GroupByOp.java src/share/classes/java/util/streams/ops/MapOp.java src/share/classes/java/util/streams/ops/Nodes.java src/share/classes/java/util/streams/ops/ReduceByOp.java src/share/classes/java/util/streams/ops/SeedlessFoldOp.java src/share/classes/java/util/streams/ops/SliceOp.java src/share/classes/java/util/streams/ops/SortedOp.java src/share/classes/java/util/streams/ops/TeeOp.java src/share/classes/java/util/streams/ops/UniqOp.java src/share/classes/java/util/streams/primitives/IntFilterOp.java src/share/classes/java/util/streams/primitives/IntForEachOp.java src/share/classes/java/util/streams/primitives/IntMapOp.java src/share/classes/java/util/streams/primitives/IntNodes.java src/share/classes/java/util/streams/primitives/IntSink.java src/share/classes/java/util/streams/primitives/IntSortedOp.java src/share/classes/java/util/streams/primitives/IntSumOp.java src/share/classes/java/util/streams/primitives/IntTeeOp.java src/share/classes/java/util/streams/primitives/IntToIntegerOp.java src/share/classes/java/util/streams/primitives/Primitives.java src/share/classes/java/util/streams/primitives/RefToIntMapOp.java test-ng/tests/org/openjdk/tests/java/util/LambdaTestHelpers.java test-ng/tests/org/openjdk/tests/java/util/streams/ops/IntNodeTest.java test-ng/tests/org/openjdk/tests/java/util/streams/ops/NodeBuilderTest.java test-ng/tests/org/openjdk/tests/java/util/streams/ops/NodeTest.java test-ng/tests/org/openjdk/tests/java/util/streams/ops/ToArrayOpTest.java
diffstat 33 files changed, 63 insertions(+), 93 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/util/Arrays.java	Wed Nov 14 18:49:41 2012 +0100
+++ b/src/share/classes/java/util/Arrays.java	Wed Nov 14 22:18:13 2012 +0100
@@ -3726,7 +3726,7 @@
         }
 
         @Override
-        public void accept(T t) {
+        public void apply(T t) {
             if (index >= length) {
                 throw new IndexOutOfBoundsException(Integer.toString(index));
             }
--- a/src/share/classes/java/util/streams/Sink.java	Wed Nov 14 18:49:41 2012 +0100
+++ b/src/share/classes/java/util/streams/Sink.java	Wed Nov 14 22:18:13 2012 +0100
@@ -37,8 +37,6 @@
  * @author Brian Goetz
  */
 public interface Sink<T> extends Block<T> {
-    void accept(T t);
-
     /**
      * Reset the sink state to receive a fresh data set. This is used when a
      * Sink is being reused by multiple calculations.
@@ -53,9 +51,6 @@
      */
     default void end() {}
 
-    @Override
-    default void apply(T t) { accept(t); }
-
     public interface OfValue<T> extends Sink<T> {
         @Override
         default void begin(int size) {}
--- a/src/share/classes/java/util/streams/ops/ConcatOp.java	Wed Nov 14 18:49:41 2012 +0100
+++ b/src/share/classes/java/util/streams/ops/ConcatOp.java	Wed Nov 14 22:18:13 2012 +0100
@@ -61,8 +61,8 @@
 
         return new Sink.ChainedValue<T>(sink) {
             @Override
-            public void accept(T t) {
-                downstream.accept(t);
+            public void apply(T t) {
+                downstream.apply(t);
             }
 
             @Override
@@ -73,7 +73,7 @@
                 // result in buffering of the stream contents
                 Iterator<? extends T> i = stream.iterator();
                 while (i.hasNext()) {
-                    downstream.accept(i.next());
+                    downstream.apply(i.next());
                 }
                 downstream.end();
             }
--- a/src/share/classes/java/util/streams/ops/CumulateOp.java	Wed Nov 14 18:49:41 2012 +0100
+++ b/src/share/classes/java/util/streams/ops/CumulateOp.java	Wed Nov 14 22:18:13 2012 +0100
@@ -62,7 +62,7 @@
             }
 
             @Override
-            public void accept(T t) {
+            public void apply(T t) {
                 if (first) {
                     first = false;
                     state = t;
@@ -70,7 +70,7 @@
                 else {
                     state = op.operate(state, t);
                 }
-                sink.accept(state);
+                sink.apply(state);
             }
 
             @Override
--- a/src/share/classes/java/util/streams/ops/FilterOp.java	Wed Nov 14 18:49:41 2012 +0100
+++ b/src/share/classes/java/util/streams/ops/FilterOp.java	Wed Nov 14 22:18:13 2012 +0100
@@ -58,9 +58,9 @@
         Objects.requireNonNull(sink);
         return new Sink.ChainedValue<T>(sink) {
             @Override
-            public void accept(T t) {
+            public void apply(T t) {
                 if (predicate.test(t))
-                    downstream.accept(t);
+                    downstream.apply(t);
             }
         };
     }
--- a/src/share/classes/java/util/streams/ops/FlatMapOp.java	Wed Nov 14 18:49:41 2012 +0100
+++ b/src/share/classes/java/util/streams/ops/FlatMapOp.java	Wed Nov 14 22:18:13 2012 +0100
@@ -61,7 +61,7 @@
     public Sink<T> wrapSink(int flags, final Sink sink) {
         Objects.requireNonNull(sink);
         return new Sink.ChainedValue<T>(sink) {
-            public void accept(T t) {
+            public void apply(T t) {
                 mapper.flatMapInto(downstream, t);
             }
         };
--- a/src/share/classes/java/util/streams/ops/FoldOp.java	Wed Nov 14 18:49:41 2012 +0100
+++ b/src/share/classes/java/util/streams/ops/FoldOp.java	Wed Nov 14 22:18:13 2012 +0100
@@ -83,7 +83,7 @@
         }
 
         @Override
-        public void accept(T t) {
+        public void apply(T t) {
             state = reducer.combine(state, t);
         }
 
--- a/src/share/classes/java/util/streams/ops/ForEachOp.java	Wed Nov 14 18:49:41 2012 +0100
+++ b/src/share/classes/java/util/streams/ops/ForEachOp.java	Wed Nov 14 22:18:13 2012 +0100
@@ -48,7 +48,7 @@
         Objects.requireNonNull(block);
         return new ForEachOp<>(new TerminalSink<T, Void>() {
          @Override
-            public void accept(T t) {
+            public void apply(T t) {
                 block.apply(t);
             }
 
--- a/src/share/classes/java/util/streams/ops/GroupByOp.java	Wed Nov 14 18:49:41 2012 +0100
+++ b/src/share/classes/java/util/streams/ops/GroupByOp.java	Wed Nov 14 22:18:13 2012 +0100
@@ -76,7 +76,7 @@
             // Cache the sink chain, so it can be reused by all F/J leaf tasks
             Sink<S> sinkChain = helper.wrapSink(new Sink.OfValue<T>() {
                 @Override
-                public void accept(T t) {
+                public void apply(T t) {
                     final Collection<T> sb = map.computeIfAbsent(mapper.map(t), (k) -> valueFactory.make());
                     synchronized (sb) {
                         sb.add(t);
@@ -111,7 +111,7 @@
         }
 
         @Override
-        public void accept(T t) {
+        public void apply(T t) {
             K key = Objects.requireNonNull(mapper.map(t), String.format("The element %s cannot be mapped to a null key", t));
             Collection<T> c = map.get(key);
             if (c == null) {
--- a/src/share/classes/java/util/streams/ops/MapOp.java	Wed Nov 14 18:49:41 2012 +0100
+++ b/src/share/classes/java/util/streams/ops/MapOp.java	Wed Nov 14 22:18:13 2012 +0100
@@ -57,8 +57,8 @@
     public Sink<T> wrapSink(int flags, Sink sink) {
         return new Sink.ChainedValue<T>(sink) {
             @Override
-            public void accept(T t) {
-                downstream.accept(mapper.map(t));
+            public void apply(T t) {
+                downstream.apply(mapper.map(t));
             }
         };
     }
--- a/src/share/classes/java/util/streams/ops/Nodes.java	Wed Nov 14 18:49:41 2012 +0100
+++ b/src/share/classes/java/util/streams/ops/Nodes.java	Wed Nov 14 22:18:13 2012 +0100
@@ -259,7 +259,7 @@
             nb.begin(-1);
             Iterator<? extends T> i = stream.iterator();
             while (i.hasNext())
-                nb.accept(i.next());
+                nb.apply(i.next());
             nb.end();
 
             return nb.build();
@@ -528,7 +528,7 @@
         }
 
         @Override
-        public void accept(T t) {
+        public void apply(T t) {
             if (curSize < array.length) {
                 array[curSize++] = t;
             } else {
@@ -951,7 +951,7 @@
         }
 
         @Override
-        public void accept(T t) {
+        public void apply(T t) {
             assert building : "not building";
             add(t);
         }
--- a/src/share/classes/java/util/streams/ops/ReduceByOp.java	Wed Nov 14 18:49:41 2012 +0100
+++ b/src/share/classes/java/util/streams/ops/ReduceByOp.java	Wed Nov 14 22:18:13 2012 +0100
@@ -70,7 +70,7 @@
             }
 
             @Override
-            public void accept(T t) {
+            public void apply(T t) {
                 U mapped = classifier.map(t);
                 W rVal = map.get(mapped);
                 if (rVal == null)
--- a/src/share/classes/java/util/streams/ops/SeedlessFoldOp.java	Wed Nov 14 18:49:41 2012 +0100
+++ b/src/share/classes/java/util/streams/ops/SeedlessFoldOp.java	Wed Nov 14 22:18:13 2012 +0100
@@ -77,7 +77,7 @@
         }
 
         @Override
-        public void accept(T t) {
+        public void apply(T t) {
             if (empty) {
                 empty = false;
                 state = t;
@@ -89,7 +89,7 @@
         @Override
         public void combine(FoldingSink other) {
             if (!other.empty)
-                accept(other.state);
+                apply(other.state);
         }
     }
 }
--- a/src/share/classes/java/util/streams/ops/SliceOp.java	Wed Nov 14 18:49:41 2012 +0100
+++ b/src/share/classes/java/util/streams/ops/SliceOp.java	Wed Nov 14 22:18:13 2012 +0100
@@ -80,9 +80,9 @@
                 int n = skip;
 
                 @Override
-                public void accept(T t) {
+                public void apply(T t) {
                     if (n == 0) {
-                        downstream.accept(t);
+                        downstream.apply(t);
                     }
                     else {
                         n--;
@@ -111,7 +111,7 @@
 
         nb.begin(size);
         while (i.hasNext())
-            nb.accept(i.next());
+            nb.apply(i.next());
         nb.end();
 
         return nb.build();
--- a/src/share/classes/java/util/streams/ops/SortedOp.java	Wed Nov 14 18:49:41 2012 +0100
+++ b/src/share/classes/java/util/streams/ops/SortedOp.java	Wed Nov 14 22:18:13 2012 +0100
@@ -87,12 +87,12 @@
                 public void end() {
                     downstream.begin(pq.size());
                     while (!pq.isEmpty())
-                        downstream.accept(pq.remove());
+                        downstream.apply(pq.remove());
                     downstream.end();
                 }
 
                 @Override
-                public void accept(T t) {
+                public void apply(T t) {
                     pq.add(t);
                 }
             };
--- a/src/share/classes/java/util/streams/ops/TeeOp.java	Wed Nov 14 18:49:41 2012 +0100
+++ b/src/share/classes/java/util/streams/ops/TeeOp.java	Wed Nov 14 22:18:13 2012 +0100
@@ -48,9 +48,9 @@
     public Sink<T> wrapSink(int flags, Sink sink) {
         return new Sink.ChainedValue<T>(sink) {
             @Override
-            public void accept(T t) {
+            public void apply(T t) {
                 tee.apply(t);
-                downstream.accept(t);
+                downstream.apply(t);
             }
         };
     }
--- a/src/share/classes/java/util/streams/ops/UniqOp.java	Wed Nov 14 18:49:41 2012 +0100
+++ b/src/share/classes/java/util/streams/ops/UniqOp.java	Wed Nov 14 22:18:13 2012 +0100
@@ -79,9 +79,9 @@
                 }
 
                 @Override
-                public void accept(T t) {
+                public void apply(T t) {
                     if (lastSeen == null || !t.equals(lastSeen)) {
-                        downstream.accept(lastSeen = t);
+                        downstream.apply(lastSeen = t);
                     }
                 }
             };
@@ -103,9 +103,9 @@
                 }
 
                 @Override
-                public void accept(T t) {
+                public void apply(T t) {
                     if (seen.add(t)) {
-                        downstream.accept(t);
+                        downstream.apply(t);
                     }
                 }
             };
@@ -207,7 +207,7 @@
                 // Cache the sink chain, so it can be reused by all F/J leaf tasks
                 Sink<S> sinkChain = helper.wrapSink(new Sink.OfValue<T>() {
                     @Override
-                    public void accept(T t) {
+                    public void apply(T t) {
                         map.putIfAbsent(t, Boolean.TRUE);
                     }
                 });
@@ -241,7 +241,7 @@
         }
 
         @Override
-        public void accept(T t) {
+        public void apply(T t) {
             set.add(t);
         }
 
@@ -278,9 +278,9 @@
         }
 
         @Override
-        public void accept(T t) {
+        public void apply(T t) {
             if (lastSeen == null || !t.equals(lastSeen)) {
-                super.accept(lastSeen = t);
+                super.apply(lastSeen = t);
             }
         }
     }
--- a/src/share/classes/java/util/streams/primitives/IntFilterOp.java	Wed Nov 14 18:49:41 2012 +0100
+++ b/src/share/classes/java/util/streams/primitives/IntFilterOp.java	Wed Nov 14 22:18:13 2012 +0100
@@ -63,9 +63,9 @@
         IntSink intSink = Primitives.adapt(sink);
         return new IntSink.ChainedValue(intSink) {
             @Override
-            public void acceptInt(int t) {
+            public void applyInt(int t) {
                 if (predicate.testInt(t))
-                    downstream.acceptInt(t);
+                    downstream.applyInt(t);
             }
         };
     }
--- a/src/share/classes/java/util/streams/primitives/IntForEachOp.java	Wed Nov 14 18:49:41 2012 +0100
+++ b/src/share/classes/java/util/streams/primitives/IntForEachOp.java	Wed Nov 14 22:18:13 2012 +0100
@@ -40,7 +40,7 @@
         return new IntForEachOp(new IntTerminalSink<Void>() {
 
             @Override
-            public void acceptInt(int i) {
+            public void applyInt(int i) {
                 block.applyInt(i);
             }
 
--- a/src/share/classes/java/util/streams/primitives/IntMapOp.java	Wed Nov 14 18:49:41 2012 +0100
+++ b/src/share/classes/java/util/streams/primitives/IntMapOp.java	Wed Nov 14 22:18:13 2012 +0100
@@ -61,8 +61,8 @@
 
         return new IntSink.ChainedValue(intSink) {
             @Override
-            public void acceptInt(int t) {
-                downstream.acceptInt(mapper.operateInt(t));
+            public void applyInt(int t) {
+                downstream.applyInt(mapper.operateInt(t));
             }
         };
     }
--- a/src/share/classes/java/util/streams/primitives/IntNodes.java	Wed Nov 14 18:49:41 2012 +0100
+++ b/src/share/classes/java/util/streams/primitives/IntNodes.java	Wed Nov 14 22:18:13 2012 +0100
@@ -422,7 +422,7 @@
         }
 
         @Override
-        public void acceptInt(int i) {
+        public void applyInt(int i) {
             if (curSize < array.length) {
                 array[curSize++] = i;
             } else {
@@ -801,7 +801,7 @@
         }
 
         @Override
-        public void acceptInt(int i) {
+        public void applyInt(int i) {
             super.applyInt(i);
         }
 
--- a/src/share/classes/java/util/streams/primitives/IntSink.java	Wed Nov 14 18:49:41 2012 +0100
+++ b/src/share/classes/java/util/streams/primitives/IntSink.java	Wed Nov 14 22:18:13 2012 +0100
@@ -31,31 +31,6 @@
 
 public interface IntSink extends Sink<Integer>, IntBlock {
 
-    // Block<Integer>, IntBlock
-
-    @Override
-    default void apply(Integer i) {
-        Logger.getLogger(getClass().getName()).log(Level.WARNING, "{0} using boxed int", getClass().getName());
-        acceptInt(i.intValue());
-    }
-
-    // IntBlock
-
-    @Override
-    default void applyInt(int i) { acceptInt(i); }
-
-    // Sink<Integer>
-
-    @Override
-    default void accept(Integer i) {
-        Logger.getLogger(getClass().getName()).log(Level.WARNING, "{0} using boxed int", getClass().getName());
-        acceptInt(i.intValue());
-    }
-
-    //
-
-    void acceptInt(int i);
-
     public static abstract class ChainedValue implements IntSink {
         protected final IntSink downstream;
 
--- a/src/share/classes/java/util/streams/primitives/IntSortedOp.java	Wed Nov 14 18:49:41 2012 +0100
+++ b/src/share/classes/java/util/streams/primitives/IntSortedOp.java	Wed Nov 14 22:18:13 2012 +0100
@@ -59,14 +59,14 @@
                 Arrays.sort(ints);
                 downstream.begin(ints.length);
                 for (int i = 0; i < ints.length; i++) {
-                    downstream.acceptInt(ints[i]);
+                    downstream.applyInt(ints[i]);
                 }
                 downstream.end();
             }
 
             @Override
-            public void acceptInt(int t) {
-                nb.acceptInt(t);
+            public void applyInt(int t) {
+                nb.applyInt(t);
             }
         };
     }
--- a/src/share/classes/java/util/streams/primitives/IntSumOp.java	Wed Nov 14 18:49:41 2012 +0100
+++ b/src/share/classes/java/util/streams/primitives/IntSumOp.java	Wed Nov 14 22:18:13 2012 +0100
@@ -69,7 +69,7 @@
         }
 
         @Override
-        public void acceptInt(int t) {
+        public void applyInt(int t) {
             sum += t;
         }
 
--- a/src/share/classes/java/util/streams/primitives/IntTeeOp.java	Wed Nov 14 18:49:41 2012 +0100
+++ b/src/share/classes/java/util/streams/primitives/IntTeeOp.java	Wed Nov 14 22:18:13 2012 +0100
@@ -56,9 +56,9 @@
         IntSink intSink = Primitives.adapt(sink);
         return new IntSink.ChainedValue(intSink) {
             @Override
-            public void acceptInt(int t) {
+            public void applyInt(int t) {
                 tee.applyInt(t);
-                downstream.acceptInt(t);
+                downstream.applyInt(t);
             }
         };
     }
--- a/src/share/classes/java/util/streams/primitives/IntToIntegerOp.java	Wed Nov 14 18:49:41 2012 +0100
+++ b/src/share/classes/java/util/streams/primitives/IntToIntegerOp.java	Wed Nov 14 22:18:13 2012 +0100
@@ -54,8 +54,8 @@
             }
 
             @Override
-            public void acceptInt(int t) {
-                sink.accept(t);
+            public void applyInt(int t) {
+                sink.apply(t);
             }
 
             @Override
--- a/src/share/classes/java/util/streams/primitives/Primitives.java	Wed Nov 14 18:49:41 2012 +0100
+++ b/src/share/classes/java/util/streams/primitives/Primitives.java	Wed Nov 14 22:18:13 2012 +0100
@@ -77,8 +77,8 @@
                 }
 
                 @Override
-                public void acceptInt(int i) {
-                    s.accept(i);
+                public void applyInt(int i) {
+                    s.apply(i);
                 }
 
                 @Override
@@ -440,7 +440,7 @@
         }
 
         @Override
-        public void acceptInt(int t) {
+        public void applyInt(int t) {
             if (o >= e) {
                 throw new IndexOutOfBoundsException(Integer.toString(o));
             }
--- a/src/share/classes/java/util/streams/primitives/RefToIntMapOp.java	Wed Nov 14 18:49:41 2012 +0100
+++ b/src/share/classes/java/util/streams/primitives/RefToIntMapOp.java	Wed Nov 14 22:18:13 2012 +0100
@@ -69,8 +69,8 @@
             }
 
             @Override
-            public void accept(T t) {
-                intSink.acceptInt(mapper.map(t));
+            public void apply(T t) {
+                intSink.applyInt(mapper.map(t));
             }
 
             @Override
--- a/test-ng/tests/org/openjdk/tests/java/util/LambdaTestHelpers.java	Wed Nov 14 18:49:41 2012 +0100
+++ b/test-ng/tests/org/openjdk/tests/java/util/LambdaTestHelpers.java	Wed Nov 14 22:18:13 2012 +0100
@@ -284,7 +284,7 @@
     public static <T,V> V iteratorToStatefulSink(Iterator<? extends T> iterator, TerminalSink<? super T, ? extends V> sink) {
         sink.begin(-1);
         while(iterator.hasNext()) {
-            sink.accept(iterator.next());
+            sink.apply(iterator.next());
         }
         sink.end();
         return sink.getAndClearState();
--- a/test-ng/tests/org/openjdk/tests/java/util/streams/ops/IntNodeTest.java	Wed Nov 14 18:49:41 2012 +0100
+++ b/test-ng/tests/org/openjdk/tests/java/util/streams/ops/IntNodeTest.java	Wed Nov 14 22:18:13 2012 +0100
@@ -92,7 +92,7 @@
     IntNode fill(int[] array, IntNodeBuilder nb) {
         nb.begin(array.length);
         for (Integer i : array) {
-            nb.acceptInt(i);
+            nb.applyInt(i);
         }
         nb.end();
         return nb.build();
--- a/test-ng/tests/org/openjdk/tests/java/util/streams/ops/NodeBuilderTest.java	Wed Nov 14 18:49:41 2012 +0100
+++ b/test-ng/tests/org/openjdk/tests/java/util/streams/ops/NodeBuilderTest.java	Wed Nov 14 22:18:13 2012 +0100
@@ -75,7 +75,7 @@
         NodeBuilder<Integer> nb = m.map(l.size());
         nb.begin(l.size());
         for (int i : l) {
-            nb.accept(i);
+            nb.apply(i);
         }
         nb.end();
 
@@ -105,7 +105,7 @@
         NodeBuilder<Integer> nb = m.map(l.size());
         nb.begin(l.size());
         for (int i : l) {
-            nb.accept(i);
+            nb.apply(i);
         }
         nb.end();
 
--- a/test-ng/tests/org/openjdk/tests/java/util/streams/ops/NodeTest.java	Wed Nov 14 18:49:41 2012 +0100
+++ b/test-ng/tests/org/openjdk/tests/java/util/streams/ops/NodeTest.java	Wed Nov 14 22:18:13 2012 +0100
@@ -77,7 +77,7 @@
     Node<Integer> fill(Integer[] array, NodeBuilder<Integer> nb) {
         nb.begin(array.length);
         for (Integer i : array) {
-            nb.accept(i);
+            nb.apply(i);
         }
         nb.end();
         return nb.build();
--- a/test-ng/tests/org/openjdk/tests/java/util/streams/ops/ToArrayOpTest.java	Wed Nov 14 18:49:41 2012 +0100
+++ b/test-ng/tests/org/openjdk/tests/java/util/streams/ops/ToArrayOpTest.java	Wed Nov 14 22:18:13 2012 +0100
@@ -122,7 +122,7 @@
         {
             NodeBuilder<Integer> nodeBuilder = Nodes.makeBuilder(l.size());
             for (Integer i : l) {
-                nodeBuilder.accept(i);
+                nodeBuilder.apply(i);
             }
             Object[] output = Streams.stream(nodeBuilder, StreamOpFlags.IS_SIZED | StreamOpFlags.IS_ORDERED).toArray();
             assertEquals(Arrays.asList(output), l);
@@ -132,7 +132,7 @@
             NodeBuilder<Integer> nodeBuilder = Nodes.makeVariableSizeBuilder();
             nodeBuilder.begin(l.size());
             for (Integer i : l) {
-                nodeBuilder.accept(i);
+                nodeBuilder.apply(i);
             }
             nodeBuilder.end();
             Object[] output = Streams.stream(nodeBuilder, StreamOpFlags.IS_SIZED | StreamOpFlags.IS_ORDERED).toArray();