/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(); 246 if ((c & Spliterator.SIZED) != 0) { [all …]
|
D | Streams.java | 29 import java.util.Spliterator; 54 static final class RangeIntSpliterator implements Spliterator.OfInt { 120 return Spliterator.ORDERED | Spliterator.SIZED | Spliterator.SUBSIZED | in characteristics() 121 Spliterator.IMMUTABLE | Spliterator.NONNULL | in characteristics() 122 Spliterator.DISTINCT | Spliterator.SORTED; in characteristics() 131 public Spliterator.OfInt trySplit() { in trySplit() 178 static final class RangeLongSpliterator implements Spliterator.OfLong { 243 return Spliterator.ORDERED | Spliterator.SIZED | Spliterator.SUBSIZED | in characteristics() 244 Spliterator.IMMUTABLE | Spliterator.NONNULL | in characteristics() 245 Spliterator.DISTINCT | Spliterator.SORTED; in characteristics() [all …]
|
D | SliceOps.java | 27 import java.util.Spliterator; 75 private static <P_IN> Spliterator<P_IN> sliceSpliterator(StreamShape shape, in sliceSpliterator() 76 Spliterator<P_IN> s, in sliceSpliterator() 78 assert s.hasCharacteristics(Spliterator.SUBSIZED); in sliceSpliterator() 81 Spliterator<P_IN> sliceSpliterator = (Spliterator<P_IN>) switch (shape) { in sliceSpliterator() 85 … -> new StreamSpliterators.SliceSpliterator.OfInt((Spliterator.OfInt) s, skip, sliceFence); in sliceSpliterator() 87 … -> new StreamSpliterators.SliceSpliterator.OfLong((Spliterator.OfLong) s, skip, sliceFence); in sliceSpliterator() 89 … -> new StreamSpliterators.SliceSpliterator.OfDouble((Spliterator.OfDouble) s, skip, sliceFence); in sliceSpliterator() 117 Spliterator<T> unorderedSkipLimitSpliterator(Spliterator<T> s, in makeRef() 130 …public <P_IN> Spliterator<T> opEvaluateParallelLazy(PipelineHelper<T> helper, Spliterator<P_IN> sp… in makeRef() [all …]
|
D | WhileOps.java | 29 import java.util.Spliterator; 67 public <P_IN> Spliterator<T> opEvaluateParallelLazy(PipelineHelper<T> helper, in makeTakeWhileRef() 68 Spliterator<P_IN> spliterator) { in makeTakeWhileRef() 82 Spliterator<P_IN> spliterator, in makeTakeWhileRef() 127 … public <P_IN> Spliterator<Integer> opEvaluateParallelLazy(PipelineHelper<Integer> helper, 128 Spliterator<P_IN> spliterator) { 135 … (Spliterator.OfInt) helper.wrapSpliterator(spliterator), false, predicate); 142 Spliterator<P_IN> spliterator, 187 public <P_IN> Spliterator<Long> opEvaluateParallelLazy(PipelineHelper<Long> helper, 188 Spliterator<P_IN> spliterator) { [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() 347 public Spliterator<E_OUT> spliterator() { in spliterator() 355 Spliterator<E_OUT> s = (Spliterator<E_OUT>) sourceStage.sourceSpliterator; in spliterator() [all …]
|
D | PipelineHelper.java | 27 import java.util.Spliterator; 95 abstract<P_IN> long exactOutputSizeIfKnown(Spliterator<P_IN> spliterator); in exactOutputSizeIfKnown() 111 abstract<P_IN, S extends Sink<P_OUT>> S wrapAndCopyInto(S sink, Spliterator<P_IN> spliterator); in wrapAndCopyInto() 128 abstract<P_IN> void copyInto(Sink<P_IN> wrappedSink, Spliterator<P_IN> spliterator); in copyInto() 145 … abstract <P_IN> boolean copyIntoWithCancel(Sink<P_IN> wrappedSink, Spliterator<P_IN> spliterator); in copyIntoWithCancel() 167 abstract<P_IN> Spliterator<P_OUT> wrapSpliterator(Spliterator<P_IN> spliterator); in wrapSpliterator() 207 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; 325 Spliterator<P_IN> spliterator, in collect() 329 if (size >= 0 && spliterator.hasCharacteristics(Spliterator.SUBSIZED)) { in collect() 363 Spliterator<P_IN> spliterator, in collectInt() 366 if (size >= 0 && spliterator.hasCharacteristics(Spliterator.SUBSIZED)) { in collectInt() 401 Spliterator<P_IN> spliterator, in collectLong() 404 if (size >= 0 && spliterator.hasCharacteristics(Spliterator.SUBSIZED)) { in collectLong() 439 Spliterator<P_IN> spliterator, in collectDouble() 442 if (size >= 0 && spliterator.hasCharacteristics(Spliterator.SUBSIZED)) { in collectDouble() 588 public Spliterator<T> spliterator() { in spliterator() [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 …]
|
/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/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/ |
D | SpliteratorTestHelper.java | 48 public static void testSpliterator(Supplier<Spliterator<Integer>> supplier) { in testSpliterator() 52 public static void testSpliterator(Supplier<Spliterator<Integer>> supplier, in testSpliterator() 57 public static void testIntSpliterator(Supplier<Spliterator.OfInt> supplier) { in testIntSpliterator() 61 public static void testIntSpliterator(Supplier<Spliterator.OfInt> supplier, in testIntSpliterator() 66 public static void testLongSpliterator(Supplier<Spliterator.OfLong> supplier) { in testLongSpliterator() 70 public static void testLongSpliterator(Supplier<Spliterator.OfLong> supplier, in testLongSpliterator() 75 public static void testDoubleSpliterator(Supplier<Spliterator.OfDouble> supplier) { in testDoubleSpliterator() 79 public static void testDoubleSpliterator(Supplier<Spliterator.OfDouble> supplier, in testDoubleSpliterator() 150 public static <T, S extends Spliterator<T>> void testSpliterator(Supplier<S> supplier, in testSpliterator() 154 Spliterator<T> spliterator = supplier.get(); in testSpliterator() [all …]
|
/libcore/ojluni/src/test/java/util/concurrent/tck/ |
D | LinkedBlockingQueue8Test.java | 37 import java.util.Spliterator; 64 Spliterator s = q.spliterator(); in testSpliterator_characteristics() 66 int required = Spliterator.CONCURRENT in testSpliterator_characteristics() 67 | Spliterator.NONNULL in testSpliterator_characteristics() 68 | Spliterator.ORDERED; in testSpliterator_characteristics() 72 & (Spliterator.DISTINCT in testSpliterator_characteristics() 73 | Spliterator.IMMUTABLE in testSpliterator_characteristics() 74 | Spliterator.SORTED)); in testSpliterator_characteristics()
|
D | LinkedBlockingDeque8Test.java | 37 import java.util.Spliterator; 64 Spliterator s = q.spliterator(); in testSpliterator_characteristics() 66 int required = Spliterator.CONCURRENT in testSpliterator_characteristics() 67 | Spliterator.NONNULL in testSpliterator_characteristics() 68 | Spliterator.ORDERED; in testSpliterator_characteristics() 72 & (Spliterator.DISTINCT in testSpliterator_characteristics() 73 | Spliterator.IMMUTABLE in testSpliterator_characteristics() 74 | Spliterator.SORTED)); in testSpliterator_characteristics()
|
D | ArrayDeque8Test.java | 38 import java.util.Spliterator; 65 Spliterator s = q.spliterator(); in testSpliterator_characteristics() 67 int required = Spliterator.NONNULL in testSpliterator_characteristics() 68 | Spliterator.ORDERED in testSpliterator_characteristics() 69 | Spliterator.SIZED in testSpliterator_characteristics() 70 | Spliterator.SUBSIZED; in testSpliterator_characteristics() 74 & (Spliterator.CONCURRENT in testSpliterator_characteristics() 75 | Spliterator.DISTINCT in testSpliterator_characteristics() 76 | Spliterator.IMMUTABLE in testSpliterator_characteristics() 77 | Spliterator.SORTED)); in testSpliterator_characteristics()
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | SpliteratorsTest.java | 27 import java.util.Spliterator; 41 Spliterator.OfInt empty = Spliterators.emptyIntSpliterator(); in testEmptyIntSpliterator() 54 assertEquals(Spliterator.SIZED | Spliterator.SUBSIZED, empty.characteristics()); in testEmptyIntSpliterator() 58 Spliterator<Object> empty = Spliterators.emptySpliterator(); in testEmptyRefSpliterator() 67 assertEquals(Spliterator.SIZED | Spliterator.SUBSIZED, empty.characteristics()); in testEmptyRefSpliterator() 71 Spliterator.OfLong empty = Spliterators.emptyLongSpliterator(); in testEmptyLongSpliterator() 84 assertEquals(Spliterator.SIZED | Spliterator.SUBSIZED, empty.characteristics()); in testEmptyLongSpliterator() 88 Spliterator.OfDouble empty = Spliterators.emptyDoubleSpliterator(); in testEmptyDoubleSpliterator() 101 assertEquals(Spliterator.SIZED | Spliterator.SUBSIZED, empty.characteristics()); in testEmptyDoubleSpliterator() 108 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/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ |
D | StreamSpliteratorTest.java | 37 import java.util.Spliterator; 69 private static class ProxyNoExactSizeSpliterator<T> implements Spliterator<T> { 70 final Spliterator<T> sp; 77 ProxyNoExactSizeSpliterator(Spliterator<T> sp, boolean proxyEstimateSize) { in ProxyNoExactSizeSpliterator() 83 public Spliterator<T> trySplit() { in trySplit() 85 Spliterator<T> prefix = sp.trySplit(); in trySplit() 119 return sp.characteristics() & ~(Spliterator.SUBSIZED | Spliterator.SIZED); in characteristics() 122 …vate static class OfInt extends ProxyNoExactSizeSpliterator<Integer> implements Spliterator.OfInt { 123 final Spliterator.OfInt psp; 125 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 …]
|
/libcore/ojluni/src/main/java/java/lang/ |
D | CharSequence.java | 31 import java.util.Spliterator; 176 Spliterator.ORDERED), in chars() 177 Spliterator.SUBSIZED | Spliterator.SIZED | Spliterator.ORDERED, in chars() 251 Spliterator.ORDERED), in codePoints() 252 Spliterator.ORDERED, in codePoints()
|