/libcore/luni/src/main/java/java/util/concurrent/ |
CopyOnWriteArraySet.java | 14 import java.util.Spliterator; 395 * Returns a {@link Spliterator} over the elements in this set in the order 398 * <p>The {@code Spliterator} reports {@link Spliterator#IMMUTABLE}, 399 * {@link Spliterator#DISTINCT}, {@link Spliterator#SIZED}, and 400 * {@link Spliterator#SUBSIZED}. 402 * <p>The spliterator provides a snapshot of the state of the set 403 * when the spliterator was constructed. No synchronization is needed while 404 * operating on the spliterator 409 public Spliterator<E> spliterator() { method in class:CopyOnWriteArraySet [all...] |
/libcore/ojluni/src/main/java/java/util/stream/ |
DoublePipeline.java | 31 import java.util.Spliterator; 62 * @param source {@code Supplier<Spliterator>} describing the stream source 66 DoublePipeline(Supplier<? extends Spliterator<Double>> source, 74 * @param source {@code Spliterator} describing the stream source 78 DoublePipeline(Spliterator<Double> source, 110 * Adapt a {@code Spliterator<Double>} to a {@code Spliterator.OfDouble}. 113 * The implementation attempts to cast to a Spliterator.OfDouble, and throws 116 private static Spliterator.OfDouble adapt(Spliterator<Double> s) 177 public final Spliterator.OfDouble spliterator() { method in class:DoublePipeline [all...] |
LongPipeline.java | 32 import java.util.Spliterator; 62 * @param source {@code Supplier<Spliterator>} describing the stream source 67 LongPipeline(Supplier<? extends Spliterator<Long>> source, 75 * @param source {@code Spliterator} describing the stream source 80 LongPipeline(Spliterator<Long> source, 111 * Adapt a {@code Spliterator<Long>} to a {@code Spliterator.OfLong}. 114 * The implementation attempts to cast to a Spliterator.OfLong, and throws 117 private static Spliterator.OfLong adapt(Spliterator<Long> s) 178 public final Spliterator.OfLong spliterator() { method in class:LongPipeline [all...] |
ReduceOps.java | 32 import java.util.Spliterator; 707 Spliterator<P_IN> spliterator) { 708 return helper.wrapAndCopyInto(makeSink(), spliterator).get(); 713 Spliterator<P_IN> spliterator) { 714 return new ReduceTask<>(this, helper, spliterator).invoke().get(); 729 Spliterator<P_IN> spliterator) { 730 super(helper, spliterator); [all...] |
SpinedBuffer.java | 33 import java.util.Spliterator; 239 return Spliterators.iterator(spliterator()); 275 = Spliterator.SIZED | Spliterator.ORDERED | Spliterator.SUBSIZED; 278 * Return a {@link Spliterator} describing the contents of the buffer. 280 public Spliterator<E> spliterator() { method in class:SpinedBuffer 281 class Splitr implements Spliterator<E> { 296 // this spliterator is fully traverse 790 public Spliterator.OfInt spliterator() { method in class:SpinedBuffer.OfInt 905 public Spliterator.OfLong spliterator() { method in class:SpinedBuffer.OfLong 1020 public Spliterator.OfDouble spliterator() { method in class:SpinedBuffer.OfDouble [all...] |
IntPipeline.java | 32 import java.util.Spliterator; 61 * @param source {@code Supplier<Spliterator>} describing the stream source 66 IntPipeline(Supplier<? extends Spliterator<Integer>> source, 74 * @param source {@code Spliterator} describing the stream source 79 IntPipeline(Spliterator<Integer> source, 112 * Adapt a {@code Spliterator<Integer>} to a {@code Spliterator.OfInt}. 115 * The implementation attempts to cast to a Spliterator.OfInt, and throws an 118 private static Spliterator.OfInt adapt(Spliterator<Integer> s) 181 public final Spliterator.OfInt spliterator() { method in class:IntPipeline [all...] |
IntStream.java | 33 import java.util.Spliterator; 683 Spliterator.OfInt spliterator(); method in interface:IntStream 760 Spliterator.ORDERED | Spliterator.IMMUTABLE | Spliterator.NONNULL), false); [all...] |
LongStream.java | 36 import java.util.Spliterator; 675 Spliterator.OfLong spliterator(); method in interface:LongStream 752 Spliterator.ORDERED | Spliterator.IMMUTABLE | Spliterator.NONNULL), false); [all...] |
StreamOpFlag.java | 29 import java.util.Spliterator; 134 * derived from the equivalent {@link java.util.Spliterator} characteristics: 135 * {@link java.util.Spliterator#DISTINCT}, {@link java.util.Spliterator#SORTED}, 136 * {@link java.util.Spliterator#ORDERED}, and 137 * {@link java.util.Spliterator#SIZED}. A spliterator characteristics bit set 139 * {@link #fromCharacteristics(java.util.Spliterator)} and converted back using 142 * produce a valid spliterator characteristics bit set that can be converted to 146 * The source of a stream encapsulates a spliterator. The characteristics o [all...] |
ReferencePipeline.java | 31 import java.util.Spliterator; 65 * @param source {@code Supplier<Spliterator>} describing the stream source 70 ReferencePipeline(Supplier<? extends Spliterator<?>> source, 78 * @param source {@code Spliterator} describing the stream source 83 ReferencePipeline(Spliterator<?> source, 107 Spliterator<P_IN> spliterator, 110 return Nodes.collect(helper, spliterator, flattenTree, generator); 114 public final <P_IN> Spliterator<P_OUT> wrap(PipelineHelper<P_OUT> ph, 115 Supplier<Spliterator<P_IN>> supplier [all...] |
/libcore/ojluni/src/test/java/util/stream/bootlib/java/util/stream/ |
StreamTestDataProvider.java | 149 () -> Arrays.spliterator(ints))); 151 () -> Arrays.spliterator(ints, 0, ints.length/2))); 157 return sb.spliterator(); 160 () -> Spliterators.spliterator(Arrays.asList(ints).iterator(), ints.length, 0))); 163 // @@@ Add map and collection spliterators when spliterator() is exposed on Collection or Iterable 185 static <T> Object[] splitDescr(String description, Supplier<Spliterator<T>> ss) { 200 // returns an array of (String name, Supplier<Spliterator<Integer>>) 201 @DataProvider(name = "Spliterator<Integer>")
|
StreamTestScenario.java | 29 import java.util.Spliterator; 90 for (Spliterator<U> spl = m.apply(data.stream()).spliterator(); spl.tryAdvance(b); ) { } 98 SpliteratorTestHelper.mixedTraverseAndSplit(b, m.apply(data.stream()).spliterator()); 106 m.apply(data.stream()).spliterator().forEachRemaining(b); 131 for (Spliterator<U> spl = m.apply(data.parallelStream()).spliterator(); spl.tryAdvance(b); ) { } 139 m.apply(data.parallelStream()).spliterator().forEachRemaining(b); 152 // Wrap as parallel stream, get the spliterator, wrap as a stream + toArray 157 Spliterator<U> sp = s.spliterator() [all...] |
/libcore/ojluni/src/test/java/util/stream/testlib/org/openjdk/testlib/java/util/stream/ |
StreamTestDataProvider.java | 152 () -> Arrays.spliterator(ints))); 154 () -> Arrays.spliterator(ints, 0, ints.length/2))); 160 return sb.spliterator(); 163 () -> Spliterators.spliterator(Arrays.asList(ints).iterator(), ints.length, 0))); 166 // @@@ Add map and collection spliterators when spliterator() is exposed on Collection or Iterable 188 static <T> Object[] splitDescr(String description, Supplier<Spliterator<T>> ss) { 203 // returns an array of (String name, Supplier<Spliterator<Integer>>) 204 @DataProvider(name = "Spliterator<Integer>")
|
StreamTestScenario.java | 29 import java.util.Spliterator; 93 for (Spliterator<U> spl = m.apply(data.stream()).spliterator(); spl.tryAdvance(b); ) { } 101 SpliteratorTestHelper.mixedTraverseAndSplit(b, m.apply(data.stream()).spliterator()); 109 m.apply(data.stream()).spliterator().forEachRemaining(b); 134 for (Spliterator<U> spl = m.apply(data.parallelStream()).spliterator(); spl.tryAdvance(b); ) { } 142 m.apply(data.parallelStream()).spliterator().forEachRemaining(b); 155 // Wrap as parallel stream, get the spliterator, wrap as a stream + toArray 160 Spliterator<U> sp = s.spliterator() [all...] |
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ |
RangeTest.java | 31 import java.util.Spliterator; 112 () -> IntStream.rangeClosed(Integer.MAX_VALUE - 8, Integer.MAX_VALUE).spliterator()); 117 Spliterator.OfInt s = IntStream.rangeClosed(Integer.MIN_VALUE, Integer.MAX_VALUE). 118 spliterator(); 202 () -> LongStream.rangeClosed(Long.MAX_VALUE - 8, Long.MAX_VALUE).spliterator()); 230 private static void assertSizedAndSubSized(Spliterator<?> s) { 231 assertTrue(s.hasCharacteristics(Spliterator.SIZED | Spliterator.SUBSIZED)); 234 private static void assertNotSizedAndSubSized(Spliterator<?> s) { 235 assertFalse(s.hasCharacteristics(Spliterator.SIZED | Spliterator.SUBSIZED)) [all...] |
DistinctOpTest.java | 27 import java.util.Spliterator; 38 import java.util.Spliterator; 122 c -> StreamSupport.stream(Spliterators.spliterator(c.toArray(), Spliterator.ORDERED | Spliterator.SORTED), false), 123 c -> StreamSupport.stream(Spliterators.spliterator(c.toArray(), Spliterator.ORDERED | Spliterator.SORTED), true), 124 c -> Spliterators.spliterator(c.toArray(), Spliterator.ORDERED | Spliterator.SORTED) [all...] |
SequentialOpTest.java | 38 import java.util.Spliterator; 87 Spliterator<Integer> spliterator = stream.spliterator(); local 90 spliterator.forEachRemaining(e -> {
|
/libcore/luni/src/test/java/libcore/java/util/ |
TreeMapTest.java | 31 import java.util.Spliterator; 494 SpliteratorTester.runBasicIterationTests_unordered(keys.spliterator(), expectedKeys, 497 SpliteratorTester.testSpliteratorNPE(keys.spliterator()); 499 assertTrue(keys.spliterator().hasCharacteristics(Spliterator.ORDERED | Spliterator.SORTED)); 527 values.spliterator(), expectedValues, String::compareTo); 529 SpliteratorTester.testSpliteratorNPE(values.spliterator()); 531 assertTrue(values.spliterator().hasCharacteristics(Spliterator.ORDERED | Spliterator.SIZED)) [all...] |
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
WeakHashMapTest.java | 32 import java.util.Spliterator; 534 SpliteratorTester.runBasicIterationTests_unordered(keys.spliterator(), expectedKeys, 537 SpliteratorTester.testSpliteratorNPE(keys.spliterator()); 539 assertTrue(keys.spliterator().hasCharacteristics(Spliterator.DISTINCT)); 567 values.spliterator(), expectedValues, String::compareTo); 569 SpliteratorTester.testSpliteratorNPE(values.spliterator()); 597 SpliteratorTester.runBasicIterationTests_unordered(values.spliterator(), expectedValues, 600 SpliteratorTester.testSpliteratorNPE(values.spliterator()); 602 assertTrue(values.spliterator().hasCharacteristics(Spliterator.DISTINCT)) [all...] |
LinkedHashSetTest.java | 29 import java.util.Spliterator; 341 SpliteratorTester.runBasicIterationTests_unordered(hashSet.spliterator(), expectedKeys, 344 SpliteratorTester.testSpliteratorNPE(hashSet.spliterator()); 346 assertTrue(hashSet.spliterator().hasCharacteristics(Spliterator.ORDERED)); 349 assertTrue(hashSet.spliterator().hasCharacteristics(Spliterator.DISTINCT));
|
TreeSetTest.java | 31 import java.util.Spliterator; 337 SpliteratorTester.runBasicIterationTests_unordered(treeSet.spliterator(), expectedKeys, 340 SpliteratorTester.testSpliteratorNPE(treeSet.spliterator()); 342 assertTrue(treeSet.spliterator().hasCharacteristics(Spliterator.ORDERED)); 345 assertTrue(treeSet.spliterator().hasCharacteristics(Spliterator.DISTINCT));
|
HashMapTest.java | 39 import java.util.Spliterator; 843 SpliteratorTester.runBasicIterationTests(keys.spliterator(), expectedKeys); 845 SpliteratorTester.testSpliteratorNPE(keys.spliterator()); 847 assertTrue(keys.spliterator().hasCharacteristics(Spliterator.SIZED | Spliterator.DISTINCT)); 849 SpliteratorTester.runSizedTests(keys.spliterator(), 16); 875 SpliteratorTester.runBasicIterationTests(values.spliterator(), expectedValues); 877 SpliteratorTester.testSpliteratorNPE(values.spliterator()); 879 assertTrue(values.spliterator().hasCharacteristics(Spliterator.SIZED)) [all...] |
HashSetTest.java | 34 import java.util.Spliterator; 271 SpliteratorTester.runBasicIterationTests_unordered(hashSet.spliterator(), expectedKeys, 274 SpliteratorTester.testSpliteratorNPE(hashSet.spliterator()); 276 assertTrue(hashSet.spliterator().hasCharacteristics(Spliterator.DISTINCT));
|
/libcore/ojluni/src/main/java/java/lang/ |
CharSequence.java | 30 import java.util.Spliterator; 155 Spliterators.spliterator( 158 Spliterator.ORDERED), 159 Spliterator.SUBSIZED | Spliterator.SIZED | Spliterator.ORDERED, 230 Spliterator.ORDERED), 231 Spliterator.ORDERED,
|
/libcore/ojluni/src/main/java/java/util/ |
HashSet.java | 314 * Creates a <em><a href="Spliterator.html#binding">late-binding</a></em> 315 * and <em>fail-fast</em> {@link Spliterator} over the elements in this 318 * <p>The {@code Spliterator} reports {@link Spliterator#SIZED} and 319 * {@link Spliterator#DISTINCT}. Overriding implementations should document 322 * @return a {@code Spliterator} over the elements in this set 325 public Spliterator<E> spliterator() { method in class:HashSet
|