/libcore/luni/src/test/java/libcore/java/util/ |
SpliteratorTester.java | 24 import java.util.Spliterator; 34 public static <T> void runBasicIterationTests(Spliterator<T> spliterator, 40 assertTrue(spliterator.tryAdvance(consumer)); 44 spliterator.forEachRemaining(consumer); 47 // There should be no more elements remaining in this spliterator. 48 assertFalse(spliterator.tryAdvance(consumer)); 49 spliterator.forEachRemaining((T) -> fail()); 52 public static <T> void runBasicIterationTests_unordered(Spliterator<T> spliterator, 198 Spliterator<T> spliterator = spliterable.spliterator(); local 223 Spliterator<T> spliterator = spliterable.spliterator(); local [all...] |
SpliteratorsTest.java | 27 import java.util.Spliterator; 37 Spliterator.OfInt empty = Spliterators.emptyIntSpliterator(); 50 assertEquals(Spliterator.SIZED | Spliterator.SUBSIZED, empty.characteristics()); 54 Spliterator<Object> empty = Spliterators.emptySpliterator(); 63 assertEquals(Spliterator.SIZED | Spliterator.SUBSIZED, empty.characteristics()); 67 Spliterator.OfLong empty = Spliterators.emptyLongSpliterator(); 80 assertEquals(Spliterator.SIZED | Spliterator.SUBSIZED, empty.characteristics()) [all...] |
/libcore/ojluni/src/main/java/java/util/stream/ |
StreamSupport.java | 28 import java.util.Spliterator; 47 * {@code Spliterator}. 49 * <p>The spliterator is only traversed, split, or queried for estimated 52 * <p>It is strongly recommended the spliterator report a characteristic of 54 * <a href="../Spliterator.html#binding">late-binding</a>. Otherwise, 61 * @param spliterator a {@code Spliterator} describing the stream elements 67 public static <T> Stream<T> stream(Spliterator<T> spliterator, boolean parallel) { 68 Objects.requireNonNull(spliterator); [all...] |
PipelineHelper.java | 27 import java.util.Spliterator; 42 * {@link TerminalOp#evaluateParallel(PipelineHelper, java.util.Spliterator)}, 43 * {@link TerminalOp#evaluateSequential(PipelineHelper, java.util.Spliterator)}, 44 * and {@link AbstractPipeline#opEvaluateParallel(PipelineHelper, java.util.Spliterator, 48 * such as {@link #wrapAndCopyInto(Sink, Spliterator)}, 49 * {@link #copyInto(Sink, Spliterator)}, and {@link #wrapSink(Sink)} to execute 79 * {@code Spliterator}, if known. If not known or known infinite, will 83 * The exact output size is known if the {@code Spliterator} has the 88 * @param spliterator the spliterator describing the relevant portion of th [all...] |
TerminalOp.java | 27 import java.util.Spliterator; 77 * @param spliterator the source spliterator 81 Spliterator<P_IN> spliterator) { 84 return evaluateSequential(helper, spliterator); 93 * @param spliterator the source spliterator 97 Spliterator<P_IN> spliterator); [all...] |
SliceOps.java | 27 import java.util.Spliterator; 71 * Creates a slice spliterator given a stream shape governing the 72 * spliterator type. Requires that the underlying Spliterator 76 private static <P_IN> Spliterator<P_IN> sliceSpliterator(StreamShape shape, 77 Spliterator<P_IN> s, 79 assert s.hasCharacteristics(Spliterator.SUBSIZED); 86 return (Spliterator<P_IN>) new StreamSpliterators 87 .SliceSpliterator.OfInt((Spliterator.OfInt) s, skip, sliceFence); 89 return (Spliterator<P_IN>) new StreamSpliterator [all...] |
AbstractTask.java | 27 import java.util.Spliterator; 34 * Each task is associated with a {@link Spliterator} that describes the portion 37 * the {@code Spliterator}) or internal nodes (which split the 38 * {@code Spliterator} into multiple child tasks). 55 * {@code Spliterator}, and override {@code onCompletion()} to merge the results 60 * spliterator.forEach(...); 103 * The spliterator for the portion of the input associated with the subtree 106 protected Spliterator<P_IN> spliterator; field in class:AbstractTask 133 * @param spliterator The {@code Spliterator} describing the source for thi [all...] |
ForEachOps.java | 28 import java.util.Spliterator; 150 Spliterator<S> spliterator) { 151 return helper.wrapAndCopyInto(this, spliterator).get(); 156 Spliterator<S> spliterator) { 158 new ForEachOrderedTask<>(helper, spliterator, this).invoke(); 160 new ForEachTask<>(helper, spliterator, helper.wrapSink(this)).invoke(); 255 private Spliterator<S> spliterator; field in class:ForEachOps.ForEachTask 366 private Spliterator<S> spliterator; field in class:ForEachOps.ForEachOrderedTask [all...] |
DistinctOps.java | 31 import java.util.Spliterator; 58 <P_IN> Node<T> reduce(PipelineHelper<T> helper, Spliterator<P_IN> spliterator) { 64 return Nodes.node(reduceOp.evaluateParallel(helper, spliterator)); 69 Spliterator<P_IN> spliterator, 73 return helper.evaluate(spliterator, false, generator); 76 return reduce(helper, spliterator); 88 forEachOp.evaluateParallel(helper, spliterator); 103 public <P_IN> Spliterator<T> opEvaluateParallelLazy(PipelineHelper<T> helper, Spliterator<P_IN> spliterator) [all...] |
AbstractPipeline.java | 28 import java.util.Spliterator; 119 * The source spliterator. Only valid for the head pipeline. 124 private Spliterator<?> sourceSpliterator; 131 private Supplier<? extends Spliterator<?>> sourceSupplier; 155 * @param source {@code Supplier<Spliterator>} describing the stream source 160 AbstractPipeline(Supplier<? extends Spliterator<?>> source, 176 * @param source {@code Spliterator} describing the stream source 181 AbstractPipeline(Spliterator<?> source, 266 * Gets the source stage spliterator if this pipeline stage is the source 270 * @return the source stage spliterator 342 public Spliterator<E_OUT> spliterator() { method in class:AbstractPipeline 397 Spliterator<?> spliterator = null; local 472 copyInto(wrapSink(Objects.requireNonNull(sink)), spliterator); local [all...] |
Node.java | 27 import java.util.Spliterator; 39 * via the {@link #count}, {@link #spliterator}, {@link #forEach}, 64 * Returns a {@link Spliterator} describing the elements contained in this 67 * @return a {@code Spliterator} describing the elements contained in this 70 Spliterator<T> spliterator(); method in interface:Node 124 Spliterator<T> spliterator = spliterator(); 128 for (int i = 0; i < from && spliterator.tryAdvance(e -> { }); i++) { 236 T_SPLITR spliterator(); method in interface:Node.OfPrimitive 360 Spliterator.OfInt spliterator = spliterator(); local 433 Spliterator.OfLong spliterator = spliterator(); local 508 Spliterator.OfDouble spliterator = spliterator(); local [all...] |
Nodes.java | 33 import java.util.Spliterator; 98 * spliterator obtained from the concatenated node preserves the encounter 301 * {@link Spliterator} has the {@link Spliterator#SUBSIZED} characteristic, 317 Spliterator<P_IN> spliterator, 320 long size = helper.exactOutputSizeIfKnown(spliterator); 321 if (size >= 0 && spliterator.hasCharacteristics(Spliterator.SUBSIZED)) { 325 new SizedCollectorTask.OfRef<>(spliterator, helper, array).invoke() 580 public Spliterator<T> spliterator() { method in class:Nodes.EmptyNode.OfRef 592 public Spliterator.OfInt spliterator() { method in class:Nodes.EmptyNode.OfInt 609 public Spliterator.OfLong spliterator() { method in class:Nodes.EmptyNode.OfLong 626 public Spliterator.OfDouble spliterator() { method in class:Nodes.EmptyNode.OfDouble 658 public Spliterator<T> spliterator() { method in class:Nodes.ArrayNode 708 public Spliterator<T> spliterator() { method in class:Nodes.CollectionNode 787 public Spliterator<T> spliterator() { method in class:Nodes.ConcNode 892 public Spliterator.OfInt spliterator() { method in class:Nodes.ConcNode.OfInt 906 public Spliterator.OfLong spliterator() { method in class:Nodes.ConcNode.OfLong 920 public Spliterator.OfDouble spliterator() { method in class:Nodes.ConcNode.OfDouble [all...] |
/libcore/ojluni/src/test/java/util/stream/bootlib/java/util/stream/ |
StatefulTestOp.java | 25 import java.util.Spliterator; 45 public <P_IN> Spliterator<T> opEvaluateParallelLazy(PipelineHelper<T> helper, 46 Spliterator<P_IN> spliterator) { 47 return op.opEvaluateParallelLazy(helper, spliterator); 52 Spliterator<P_IN> spliterator, 54 return op.opEvaluateParallel(helper, spliterator, generator); 65 public <P_IN> Spliterator<Integer> opEvaluateParallelLazy(PipelineHelper<Integer> helper, 66 Spliterator<P_IN> spliterator) [all...] |
TestData.java | 29 import java.util.Spliterator; 48 return Spliterators.iterator(spliterator()); 51 Spliterator<T> spliterator(); method in interface:TestData 54 return spliterator().hasCharacteristics(Spliterator.ORDERED); 60 spliterator().forEachRemaining(target::add); 80 Arrays::spliterator, a -> a.length); 85 Collection::spliterator, Collection::size); 90 b -> StreamSupport.stream(b.spliterator(), false) 251 public T_SPLITR spliterator() { method in class:TestData.AbstractTestData [all...] |
SpliteratorTestHelper.java | 35 import java.util.Spliterator; 59 public static void testSpliterator(Supplier<Spliterator<Integer>> supplier) { 63 public static void testSpliterator(Supplier<Spliterator<Integer>> supplier, 68 public static void testIntSpliterator(Supplier<Spliterator.OfInt> supplier) { 72 public static void testIntSpliterator(Supplier<Spliterator.OfInt> supplier, 95 public static void testLongSpliterator(Supplier<Spliterator.OfLong> supplier) { 99 public static void testLongSpliterator(Supplier<Spliterator.OfLong> supplier, 122 public static void testDoubleSpliterator(Supplier<Spliterator.OfDouble> supplier) { 126 public static void testDoubleSpliterator(Supplier<Spliterator.OfDouble> supplier, 149 static <T, S extends Spliterator<T>> void testSpliterator(Supplier<S> supplier 153 Spliterator<T> spliterator = supplier.get(); local 202 S spliterator = supplier.get(); local 232 S spliterator = supplier.get(); local 262 S spliterator = supplier.get(); local 293 S spliterator = supplier.get(); local 336 Spliterator<T> spliterator = supplier.get(); local 360 S spliterator = supplier.get(); local 388 S spliterator = supplier.get(); local [all...] |
CollectorOps.java | 27 import java.util.Spliterator; 70 Spliterator<P_IN> spliterator, 72 return helper.evaluate(spliterator, false, generator); 87 Spliterator<P_IN> spliterator, 92 return super.opEvaluateParallel(helper, spliterator, generator);
|
/libcore/ojluni/src/test/java/util/stream/testlib/org/openjdk/testlib/java/util/stream/ |
StatefulTestOp.java | 25 import java.util.Spliterator; 46 public <P_IN> Spliterator<T> opEvaluateParallelLazy(PipelineHelper<T> helper, 47 Spliterator<P_IN> spliterator) { 48 return op.opEvaluateParallelLazy(helper, spliterator); 53 Spliterator<P_IN> spliterator, 55 return op.opEvaluateParallel(helper, spliterator, generator); 66 public <P_IN> Spliterator<Integer> opEvaluateParallelLazy(PipelineHelper<Integer> helper, 67 Spliterator<P_IN> spliterator) [all...] |
TestData.java | 29 import java.util.Spliterator; 49 return Spliterators.iterator(spliterator()); 52 Spliterator<T> spliterator(); method in interface:TestData 55 return spliterator().hasCharacteristics(Spliterator.ORDERED); 61 spliterator().forEachRemaining(target::add); 81 Arrays::spliterator, a -> a.length); 86 Collection::spliterator, Collection::size); 91 b -> StreamSupport.stream(b.spliterator(), false) 252 public T_SPLITR spliterator() { method in class:TestData.AbstractTestData [all...] |
SpliteratorTestHelper.java | 35 import java.util.Spliterator; 59 public static void testSpliterator(Supplier<Spliterator<Integer>> supplier) { 63 public static void testSpliterator(Supplier<Spliterator<Integer>> supplier, 68 public static void testIntSpliterator(Supplier<Spliterator.OfInt> supplier) { 72 public static void testIntSpliterator(Supplier<Spliterator.OfInt> supplier, 95 public static void testLongSpliterator(Supplier<Spliterator.OfLong> supplier) { 99 public static void testLongSpliterator(Supplier<Spliterator.OfLong> supplier, 122 public static void testDoubleSpliterator(Supplier<Spliterator.OfDouble> supplier) { 126 public static void testDoubleSpliterator(Supplier<Spliterator.OfDouble> supplier, 149 static <T, S extends Spliterator<T>> void testSpliterator(Supplier<S> supplier 153 Spliterator<T> spliterator = supplier.get(); local 202 S spliterator = supplier.get(); local 232 S spliterator = supplier.get(); local 262 S spliterator = supplier.get(); local 293 S spliterator = supplier.get(); local 336 Spliterator<T> spliterator = supplier.get(); local 360 S spliterator = supplier.get(); local 388 S spliterator = supplier.get(); local [all...] |
CollectorOps.java | 27 import java.util.Spliterator; 71 Spliterator<P_IN> spliterator, 73 return helper.evaluate(spliterator, false, generator); 88 Spliterator<P_IN> spliterator, 93 return super.opEvaluateParallel(helper, spliterator, generator);
|
/libcore/ojluni/src/main/java/java/util/ |
LinkedHashSet.java | 173 * Creates a <em><a href="Spliterator.html#binding">late-binding</a></em> 174 * and <em>fail-fast</em> {@code Spliterator} over the elements in this set. 176 * <p>The {@code Spliterator} reports {@link Spliterator#SIZED}, 177 * {@link Spliterator#DISTINCT}, and {@code ORDERED}. Implementations 182 * <em><a href="Spliterator.html#binding">late-binding</a></em> spliterator 183 * from the set's {@code Iterator}. The spliterator inherits the 185 * The created {@code Spliterator} additionally reports 186 * {@link Spliterator#SUBSIZED} 192 public Spliterator<E> spliterator() { method in class:LinkedHashSet [all...] |
Set.java | 387 * Creates a {@code Spliterator} over the elements in this set. 389 * <p>The {@code Spliterator} reports {@link Spliterator#DISTINCT}. 395 * <em><a href="Spliterator.html#binding">late-binding</a></em> spliterator 396 * from the set's {@code Iterator}. The spliterator inherits the 399 * The created {@code Spliterator} additionally reports 400 * {@link Spliterator#SIZED}. 403 * The created {@code Spliterator} additionally reports 404 * {@link Spliterator#SUBSIZED} 410 default Spliterator<E> spliterator() { method in interface:Set [all...] |
Collection.java | 498 * Creates a {@link Spliterator} over the elements in this collection. 501 * spliterator. Such characteristic values are not required to be reported 502 * if the spliterator reports {@link Spliterator#SIZED} and this collection 506 * can return a more efficient spliterator. In order to 510 * <em><a href="Spliterator.html#binding">late-binding</a></em>. 512 * spliterator's documented policy of binding and structural interference, 514 * methods to create streams using a {@code Supplier} of the spliterator, 517 * Stream<E> s = StreamSupport.stream(() -> spliterator(), spliteratorCharacteristics) 526 * <em><a href="Spliterator.html#binding">late-binding</a></em> spliterato 548 default Spliterator<E> spliterator() { method in interface:Collection [all...] |
/libcore/ojluni/src/test/java/util/stream/boottest/java/util/stream/ |
SpinedBufferTest.java | 90 assertEquals(sb.count(), sb.spliterator().getExactSizeIfKnown()); 92 SpliteratorTestHelper.testSpliterator(sb::spliterator); 97 Spliterator<Integer> spliterator = sb.spliterator(); local 98 Spliterator<Integer> split = spliterator.trySplit(); 100 long lastSplitSize = spliterator.getExactSizeIfKnown(); 106 spliterator.forEachRemaining(contentOfLastSplit::add); 165 assertEquals(sb.count(), sb.spliterator().getExactSizeIfKnown()) 172 Spliterator.OfInt spliterator = sb.spliterator(); local 247 Spliterator.OfLong spliterator = sb.spliterator(); local 323 Spliterator.OfDouble spliterator = sb.spliterator(); local [all...] |
/libcore/ojluni/src/main/java/java/lang/ |
Iterable.java | 29 import java.util.Spliterator; 80 * Creates a {@link Spliterator} over the elements described by this 85 * <em><a href="Spliterator.html#binding">early-binding</a></em> 86 * spliterator from the iterable's {@code Iterator}. The spliterator 91 * spliterator returned by the default implementation has poor splitting 92 * capabilities, is unsized, and does not report any spliterator 96 * @return a {@code Spliterator} over the elements described by this 100 default Spliterator<T> spliterator() { method in interface:Iterable [all...] |