/libcore/ojluni/src/main/java/java/util/stream/ |
D | StreamSpliterators.java | 29 import java.util.Spliterator; 62 implements Spliterator<P_OUT> { 78 private Supplier<Spliterator<P_IN>> spliteratorSupplier; 84 Spliterator<P_IN> spliterator; 116 Supplier<Spliterator<P_IN>> spliteratorSupplier, in AbstractWrappingSpliterator() 129 Spliterator<P_IN> spliterator, in AbstractWrappingSpliterator() 179 abstract AbstractWrappingSpliterator<P_IN, P_OUT, ?> wrap(Spliterator<P_IN> s); 188 public Spliterator<P_OUT> trySplit() { 192 Spliterator<P_IN> split = spliterator.trySplit(); 248 if ((c & Spliterator.SIZED) != 0) { [all …]
|
D | Streams.java | 29 import java.util.Spliterator; 61 static final class RangeIntSpliterator implements Spliterator.OfInt { 126 return Spliterator.ORDERED | Spliterator.SIZED | Spliterator.SUBSIZED | in characteristics() 127 Spliterator.IMMUTABLE | Spliterator.NONNULL | in characteristics() 128 Spliterator.DISTINCT | Spliterator.SORTED; in characteristics() 137 public Spliterator.OfInt trySplit() { in trySplit() 185 static final class RangeLongSpliterator implements Spliterator.OfLong { 250 return Spliterator.ORDERED | Spliterator.SIZED | Spliterator.SUBSIZED | in characteristics() 251 Spliterator.IMMUTABLE | Spliterator.NONNULL | in characteristics() 252 Spliterator.DISTINCT | Spliterator.SORTED; in characteristics() [all …]
|
D | SliceOps.java | 27 import java.util.Spliterator; 76 private static <P_IN> Spliterator<P_IN> sliceSpliterator(StreamShape shape, in sliceSpliterator() 77 Spliterator<P_IN> s, in sliceSpliterator() 79 assert s.hasCharacteristics(Spliterator.SUBSIZED); in sliceSpliterator() 86 return (Spliterator<P_IN>) new StreamSpliterators in sliceSpliterator() 87 .SliceSpliterator.OfInt((Spliterator.OfInt) s, skip, sliceFence); in sliceSpliterator() 89 return (Spliterator<P_IN>) new StreamSpliterators in sliceSpliterator() 90 .SliceSpliterator.OfLong((Spliterator.OfLong) s, skip, sliceFence); in sliceSpliterator() 92 return (Spliterator<P_IN>) new StreamSpliterators in sliceSpliterator() 93 .SliceSpliterator.OfDouble((Spliterator.OfDouble) s, skip, sliceFence); in sliceSpliterator() [all …]
|
D | AbstractPipeline.java | 28 import java.util.Spliterator; 125 private Spliterator<?> sourceSpliterator; 132 private Supplier<? extends Spliterator<?>> sourceSupplier; 161 AbstractPipeline(Supplier<? extends Spliterator<?>> source, in AbstractPipeline() 182 AbstractPipeline(Spliterator<?> source, in AbstractPipeline() 277 final Spliterator<E_OUT> sourceStageSpliterator() { in sourceStageSpliterator() 287 Spliterator<E_OUT> s = sourceStage.sourceSpliterator; in sourceStageSpliterator() 293 Spliterator<E_OUT> s = (Spliterator<E_OUT>) sourceStage.sourceSupplier.get(); in sourceStageSpliterator() 344 public Spliterator<E_OUT> spliterator() { in spliterator() 352 Spliterator<E_OUT> s = (Spliterator<E_OUT>) sourceStage.sourceSpliterator; in spliterator() [all …]
|
D | PipelineHelper.java | 27 import java.util.Spliterator; 94 abstract<P_IN> long exactOutputSizeIfKnown(Spliterator<P_IN> spliterator); in exactOutputSizeIfKnown() 110 abstract<P_IN, S extends Sink<P_OUT>> S wrapAndCopyInto(S sink, Spliterator<P_IN> spliterator); in wrapAndCopyInto() 127 abstract<P_IN> void copyInto(Sink<P_IN> wrappedSink, Spliterator<P_IN> spliterator); in copyInto() 143 abstract <P_IN> void copyIntoWithCancel(Sink<P_IN> wrappedSink, Spliterator<P_IN> spliterator); in copyIntoWithCancel() 165 abstract<P_IN> Spliterator<P_OUT> wrapSpliterator(Spliterator<P_IN> spliterator); in wrapSpliterator() 205 public abstract<P_IN> Node<P_OUT> evaluate(Spliterator<P_IN> spliterator, in evaluate()
|
D | StreamSupport.java | 28 import java.util.Spliterator; 67 public static <T> Stream<T> stream(Spliterator<T> spliterator, boolean parallel) { in stream() 107 public static <T> Stream<T> stream(Supplier<? extends Spliterator<T>> supplier, in stream() 137 public static IntStream intStream(Spliterator.OfInt spliterator, boolean parallel) { in intStream() 175 public static IntStream intStream(Supplier<? extends Spliterator.OfInt> supplier, in intStream() 204 public static LongStream longStream(Spliterator.OfLong spliterator, in longStream() 243 public static LongStream longStream(Supplier<? extends Spliterator.OfLong> supplier, in longStream() 272 public static DoubleStream doubleStream(Spliterator.OfDouble spliterator, in doubleStream() 311 public static DoubleStream doubleStream(Supplier<? extends Spliterator.OfDouble> supplier, in doubleStream()
|
D | Nodes.java | 33 import java.util.Spliterator; 317 Spliterator<P_IN> spliterator, in collect() 321 if (size >= 0 && spliterator.hasCharacteristics(Spliterator.SUBSIZED)) { in collect() 355 Spliterator<P_IN> spliterator, in collectInt() 358 if (size >= 0 && spliterator.hasCharacteristics(Spliterator.SUBSIZED)) { in collectInt() 393 Spliterator<P_IN> spliterator, in collectLong() 396 if (size >= 0 && spliterator.hasCharacteristics(Spliterator.SUBSIZED)) { in collectLong() 431 Spliterator<P_IN> spliterator, in collectDouble() 434 if (size >= 0 && spliterator.hasCharacteristics(Spliterator.SUBSIZED)) { in collectDouble() 580 public Spliterator<T> spliterator() { in spliterator() [all …]
|
D | DoublePipeline.java | 31 import java.util.Spliterator; 67 DoublePipeline(Supplier<? extends Spliterator<Double>> source, in DoublePipeline() 79 DoublePipeline(Spliterator<Double> source, in DoublePipeline() 117 private static Spliterator.OfDouble adapt(Spliterator<Double> s) { in adapt() 118 if (s instanceof Spliterator.OfDouble) { in adapt() 119 return (Spliterator.OfDouble) s; in adapt() 140 Spliterator<P_IN> spliterator, in evaluateToNode() 148 public final <P_IN> Spliterator<Double> wrap(PipelineHelper<Double> ph, in wrap() 149 Supplier<Spliterator<P_IN>> supplier, in wrap() 157 …public final Spliterator.OfDouble lazySpliterator(Supplier<? extends Spliterator<Double>> supplier… in lazySpliterator() [all …]
|
D | IntPipeline.java | 32 import java.util.Spliterator; 67 IntPipeline(Supplier<? extends Spliterator<Integer>> source, in IntPipeline() 80 IntPipeline(Spliterator<Integer> source, in IntPipeline() 119 private static Spliterator.OfInt adapt(Spliterator<Integer> s) { in adapt() 120 if (s instanceof Spliterator.OfInt) { in adapt() 121 return (Spliterator.OfInt) s; in adapt() 143 Spliterator<P_IN> spliterator, in evaluateToNode() 151 public final <P_IN> Spliterator<Integer> wrap(PipelineHelper<Integer> ph, in wrap() 152 Supplier<Spliterator<P_IN>> supplier, in wrap() 160 …public final Spliterator.OfInt lazySpliterator(Supplier<? extends Spliterator<Integer>> supplier) { in lazySpliterator() [all …]
|
D | LongPipeline.java | 32 import java.util.Spliterator; 68 LongPipeline(Supplier<? extends Spliterator<Long>> source, in LongPipeline() 81 LongPipeline(Spliterator<Long> source, in LongPipeline() 118 private static Spliterator.OfLong adapt(Spliterator<Long> s) { in adapt() 119 if (s instanceof Spliterator.OfLong) { in adapt() 120 return (Spliterator.OfLong) s; in adapt() 141 Spliterator<P_IN> spliterator, in evaluateToNode() 149 public final <P_IN> Spliterator<Long> wrap(PipelineHelper<Long> ph, in wrap() 150 Supplier<Spliterator<P_IN>> supplier, in wrap() 158 … public final Spliterator.OfLong lazySpliterator(Supplier<? extends Spliterator<Long>> supplier) { in lazySpliterator() [all …]
|
/libcore/ojluni/src/main/java/java/util/ |
D | Spliterators.java | 59 public static <T> Spliterator<T> emptySpliterator() { in emptySpliterator() 60 return (Spliterator<T>) EMPTY_SPLITERATOR; in emptySpliterator() 63 private static final Spliterator<Object> EMPTY_SPLITERATOR = 75 public static Spliterator.OfInt emptyIntSpliterator() { in emptyIntSpliterator() 79 private static final Spliterator.OfInt EMPTY_INT_SPLITERATOR = 91 public static Spliterator.OfLong emptyLongSpliterator() { in emptyLongSpliterator() 95 private static final Spliterator.OfLong EMPTY_LONG_SPLITERATOR = 107 public static Spliterator.OfDouble emptyDoubleSpliterator() { in emptyDoubleSpliterator() 111 private static final Spliterator.OfDouble EMPTY_DOUBLE_SPLITERATOR = 140 public static <T> Spliterator<T> spliterator(Object[] array, in spliterator() [all …]
|
D | SortedSet.java | 255 default Spliterator<E> spliterator() { in spliterator() 257 this, Spliterator.DISTINCT | Spliterator.SORTED | Spliterator.ORDERED) { in spliterator()
|
/libcore/ojluni/src/test/java/util/stream/bootlib/java/util/stream/ |
D | SpliteratorTestHelper.java | 35 import java.util.Spliterator; 59 public static void testSpliterator(Supplier<Spliterator<Integer>> supplier) { in testSpliterator() 63 public static void testSpliterator(Supplier<Spliterator<Integer>> supplier, in testSpliterator() 68 public static void testIntSpliterator(Supplier<Spliterator.OfInt> supplier) { in testIntSpliterator() 72 public static void testIntSpliterator(Supplier<Spliterator.OfInt> supplier, in testIntSpliterator() 95 public static void testLongSpliterator(Supplier<Spliterator.OfLong> supplier) { in testLongSpliterator() 99 public static void testLongSpliterator(Supplier<Spliterator.OfLong> supplier, in testLongSpliterator() 122 public static void testDoubleSpliterator(Supplier<Spliterator.OfDouble> supplier) { in testDoubleSpliterator() 126 public static void testDoubleSpliterator(Supplier<Spliterator.OfDouble> supplier, in testDoubleSpliterator() 149 static <T, S extends Spliterator<T>> void testSpliterator(Supplier<S> supplier, in testSpliterator() [all …]
|
D | StatefulTestOp.java | 25 import java.util.Spliterator; 45 public <P_IN> Spliterator<T> opEvaluateParallelLazy(PipelineHelper<T> helper, in chain() 46 Spliterator<P_IN> spliterator) { in chain() 52 Spliterator<P_IN> spliterator, in chain() 65 … public <P_IN> Spliterator<Integer> opEvaluateParallelLazy(PipelineHelper<Integer> helper, in chain() 66 Spliterator<P_IN> spliterator) { in chain() 72 Spliterator<P_IN> spliterator, in chain() 85 … public <P_IN> Spliterator<Long> opEvaluateParallelLazy(PipelineHelper<Long> helper, in chain() 86 Spliterator<P_IN> spliterator) { in chain() 92 Spliterator<P_IN> spliterator, in chain() [all …]
|
D | TestData.java | 29 import java.util.Spliterator; 51 Spliterator<T> spliterator(); in spliterator() 54 return spliterator().hasCharacteristics(Spliterator.ORDERED); in isOrdered() 106 … n -> StreamSupport.stream(n::spliterator, Spliterator.SIZED | Spliterator.ORDERED, false), in ofRefNode() 107 … n -> StreamSupport.stream(n::spliterator, Spliterator.SIZED | Spliterator.ORDERED, true), in ofRefNode() 135 int characteristics = Spliterator.SIZED | Spliterator.ORDERED; in ofNode() 166 int characteristics = Spliterator.SIZED | Spliterator.ORDERED; in ofNode() 197 int characteristics = Spliterator.SIZED | Spliterator.ORDERED; in ofNode() 209 T_SPLITR extends Spliterator<T>> 266 extends AbstractTestData<T, Stream<T>, I, Spliterator<T>> [all …]
|
/libcore/ojluni/src/test/java/util/stream/testlib/org/openjdk/testlib/java/util/stream/ |
D | SpliteratorTestHelper.java | 35 import java.util.Spliterator; 59 public static void testSpliterator(Supplier<Spliterator<Integer>> supplier) { in testSpliterator() 63 public static void testSpliterator(Supplier<Spliterator<Integer>> supplier, in testSpliterator() 68 public static void testIntSpliterator(Supplier<Spliterator.OfInt> supplier) { in testIntSpliterator() 72 public static void testIntSpliterator(Supplier<Spliterator.OfInt> supplier, in testIntSpliterator() 95 public static void testLongSpliterator(Supplier<Spliterator.OfLong> supplier) { in testLongSpliterator() 99 public static void testLongSpliterator(Supplier<Spliterator.OfLong> supplier, in testLongSpliterator() 122 public static void testDoubleSpliterator(Supplier<Spliterator.OfDouble> supplier) { in testDoubleSpliterator() 126 public static void testDoubleSpliterator(Supplier<Spliterator.OfDouble> supplier, in testDoubleSpliterator() 149 static <T, S extends Spliterator<T>> void testSpliterator(Supplier<S> supplier, in testSpliterator() [all …]
|
D | StatefulTestOp.java | 25 import java.util.Spliterator; 46 public <P_IN> Spliterator<T> opEvaluateParallelLazy(PipelineHelper<T> helper, in chain() 47 Spliterator<P_IN> spliterator) { in chain() 53 Spliterator<P_IN> spliterator, in chain() 66 … public <P_IN> Spliterator<Integer> opEvaluateParallelLazy(PipelineHelper<Integer> helper, in chain() 67 Spliterator<P_IN> spliterator) { in chain() 73 Spliterator<P_IN> spliterator, in chain() 86 <P_IN> Spliterator<Long> opEvaluateParallelLazy(PipelineHelper<Long> helper, in chain() 87 Spliterator<P_IN> spliterator) { in chain() 93 Spliterator<P_IN> spliterator, in chain() [all …]
|
D | TestData.java | 29 import java.util.Spliterator; 52 Spliterator<T> spliterator(); in spliterator() 55 return spliterator().hasCharacteristics(Spliterator.ORDERED); in isOrdered() 107 … n -> StreamSupport.stream(n::spliterator, Spliterator.SIZED | Spliterator.ORDERED, false), in ofRefNode() 108 … n -> StreamSupport.stream(n::spliterator, Spliterator.SIZED | Spliterator.ORDERED, true), in ofRefNode() 136 int characteristics = Spliterator.SIZED | Spliterator.ORDERED; in ofNode() 167 int characteristics = Spliterator.SIZED | Spliterator.ORDERED; in ofNode() 198 int characteristics = Spliterator.SIZED | Spliterator.ORDERED; in ofNode() 210 T_SPLITR extends Spliterator<T>> 267 extends AbstractTestData<T, Stream<T>, I, Spliterator<T>> [all …]
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | SpliteratorsTest.java | 27 import java.util.Spliterator; 37 Spliterator.OfInt empty = Spliterators.emptyIntSpliterator(); in testEmptyIntSpliterator() 50 assertEquals(Spliterator.SIZED | Spliterator.SUBSIZED, empty.characteristics()); in testEmptyIntSpliterator() 54 Spliterator<Object> empty = Spliterators.emptySpliterator(); in testEmptyRefSpliterator() 63 assertEquals(Spliterator.SIZED | Spliterator.SUBSIZED, empty.characteristics()); in testEmptyRefSpliterator() 67 Spliterator.OfLong empty = Spliterators.emptyLongSpliterator(); in testEmptyLongSpliterator() 80 assertEquals(Spliterator.SIZED | Spliterator.SUBSIZED, empty.characteristics()); in testEmptyLongSpliterator() 84 Spliterator.OfDouble empty = Spliterators.emptyDoubleSpliterator(); in testEmptyDoubleSpliterator() 97 assertEquals(Spliterator.SIZED | Spliterator.SUBSIZED, empty.characteristics()); in testEmptyDoubleSpliterator() 104 Spliterator<String> sp = Spliterators.spliterator(array, 0); in testSpliteratorObjectArray() [all …]
|
D | SpliteratorTester.java | 29 import java.util.Spliterator; 32 import static java.util.Spliterator.ORDERED; 33 import static java.util.Spliterator.SIZED; 34 import static java.util.Spliterator.SUBSIZED; 43 public static <T> void runBasicIterationTests(Spliterator<T> spliterator, in runBasicIterationTests() 61 public static <T> void runBasicIterationTests_unordered(Spliterator<T> spliterator, in runBasicIterationTests_unordered() 86 Spliterator<T> spliterator, ArrayList<T> recorder) { in recordAndAssertBasicIteration() 98 public static void testSpliteratorNPE(Spliterator<?> spliterator) { in testSpliteratorNPE() 117 public static <T> void runBasicSplitTests(Spliterator<T> spliterator, in runBasicSplitTests() 127 Spliterator<T> split1 = spliterator.trySplit(); in runBasicSplitTests() [all …]
|
D | HashMapTest.java | 30 import java.util.Spliterator; 103 assertEquals(Spliterator.DISTINCT | Spliterator.SIZED, in test_spliterator_keySet() 128 assertEquals(Spliterator.SIZED, values.spliterator().characteristics()); in test_spliterator_values() 136 assertEquals(Spliterator.DISTINCT | Spliterator.SIZED, in test_spliterator_entrySet() 170 assertFalse(m.entrySet().spliterator().trySplit().hasCharacteristics(Spliterator.SIZED)); in test_entrySet_subsizeEstimates() 200 assertTrue(m.entrySet().spliterator().hasCharacteristics(Spliterator.SIZED)); in test_entrySet_spliterator_sizedButNotSubsized() 201 assertFalse(m.entrySet().spliterator().hasCharacteristics(Spliterator.SUBSIZED)); in test_entrySet_spliterator_sizedButNotSubsized() 204 assertTrue(m.entrySet().spliterator().hasCharacteristics(Spliterator.SIZED)); in test_entrySet_spliterator_sizedButNotSubsized() 205 assertFalse(m.entrySet().spliterator().hasCharacteristics(Spliterator.SUBSIZED)); in test_entrySet_spliterator_sizedButNotSubsized() 206 Spliterator<Map.Entry<String, String>> parent = m.entrySet().spliterator(); in test_entrySet_spliterator_sizedButNotSubsized() [all …]
|
/libcore/ojluni/src/main/java/java/lang/ |
D | CharSequence.java | 30 import java.util.Spliterator; 158 Spliterator.ORDERED), in chars() 159 Spliterator.SUBSIZED | Spliterator.SIZED | Spliterator.ORDERED, in chars() 230 Spliterator.ORDERED), in codePoints() 231 Spliterator.ORDERED, in codePoints()
|
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ |
D | StreamSpliteratorTest.java | 37 import java.util.Spliterator; 65 private static class ProxyNoExactSizeSpliterator<T> implements Spliterator<T> { 66 final Spliterator<T> sp; 73 ProxyNoExactSizeSpliterator(Spliterator<T> sp, boolean proxyEstimateSize) { in ProxyNoExactSizeSpliterator() 79 public Spliterator<T> trySplit() { in trySplit() 81 Spliterator<T> prefix = sp.trySplit(); in trySplit() 115 return sp.characteristics() & ~(Spliterator.SUBSIZED | Spliterator.SIZED); in characteristics() 118 …vate static class OfInt extends ProxyNoExactSizeSpliterator<Integer> implements Spliterator.OfInt { 119 final Spliterator.OfInt psp; 121 private OfInt(Spliterator.OfInt sp, boolean proxyEstimateSize) { in OfInt() [all …]
|
D | RangeTest.java | 31 import java.util.Spliterator; 117 Spliterator.OfInt s = IntStream.rangeClosed(Integer.MIN_VALUE, Integer.MAX_VALUE). in testIntRange() 230 private static void assertSizedAndSubSized(Spliterator<?> s) { in assertSizedAndSubSized() 231 assertTrue(s.hasCharacteristics(Spliterator.SIZED | Spliterator.SUBSIZED)); in assertSizedAndSubSized() 234 private static void assertNotSizedAndSubSized(Spliterator<?> s) { in assertNotSizedAndSubSized() 235 assertFalse(s.hasCharacteristics(Spliterator.SIZED | Spliterator.SUBSIZED)); in assertNotSizedAndSubSized() 244 Spliterator.OfLong s = LongStream.range(Long.MIN_VALUE, Long.MAX_VALUE).spliterator(); in testLongLongRange() 249 Spliterator.OfLong s1 = s.trySplit(); in testLongLongRange() 253 Spliterator.OfLong s2 = s1.trySplit(); in testLongLongRange() 270 Spliterator.OfLong s = LongStream.range(start, end).spliterator(); in testLongLongRange() [all …]
|
D | SpliteratorTest.java | 34 import java.util.Spliterator; 48 public void testSpliterator(String name, Supplier<Spliterator<Integer>> supplier) { in testSpliterator() 53 public void testIntSpliterator(String name, Supplier<Spliterator.OfInt> supplier) { in testIntSpliterator() 58 public void testLongSpliterator(String name, Supplier<Spliterator.OfLong> supplier) { in testLongSpliterator() 63 public void testDoubleSpliterator(String name, Supplier<Spliterator.OfDouble> supplier) { in testDoubleSpliterator()
|