/libcore/ojluni/src/main/java/java/util/stream/ |
D | SpinedBuffer.java | 246 public void forEach(Consumer<? super E> consumer) { in forEach() argument 250 consumer.accept(t); in forEach() 254 consumer.accept(curChunk[i]); in forEach() 331 public boolean tryAdvance(Consumer<? super E> consumer) { in spliterator() argument 332 Objects.requireNonNull(consumer); in spliterator() 336 consumer.accept(splChunk[splElementIndex++]); in spliterator() 350 public void forEachRemaining(Consumer<? super E> consumer) { in spliterator() argument 351 Objects.requireNonNull(consumer); in spliterator() 360 consumer.accept(chunk[i]); in spliterator() 368 consumer.accept(chunk[i]); in spliterator() [all …]
|
D | ForEachOps.java | 175 final Consumer<? super T> consumer; field in ForEachOps.ForEachOp.OfRef 177 OfRef(Consumer<? super T> consumer, boolean ordered) { in OfRef() argument 179 this.consumer = consumer; in OfRef() 184 consumer.accept(t); in accept() 191 final IntConsumer consumer; field in ForEachOps.ForEachOp.OfInt 193 OfInt(IntConsumer consumer, boolean ordered) { in OfInt() argument 195 this.consumer = consumer; in OfInt() 205 consumer.accept(t); in accept() 212 final LongConsumer consumer; field in ForEachOps.ForEachOp.OfLong 214 OfLong(LongConsumer consumer, boolean ordered) { in OfLong() argument [all …]
|
D | Streams.java | 83 public boolean tryAdvance(IntConsumer consumer) { in tryAdvance() argument 84 Objects.requireNonNull(consumer); in tryAdvance() 89 consumer.accept(i); in tryAdvance() 94 consumer.accept(i); in tryAdvance() 101 public void forEachRemaining(IntConsumer consumer) { in forEachRemaining() argument 102 Objects.requireNonNull(consumer); in forEachRemaining() 110 consumer.accept(i++); in forEachRemaining() 114 consumer.accept(i); in forEachRemaining() 208 public boolean tryAdvance(LongConsumer consumer) { in tryAdvance() argument 209 Objects.requireNonNull(consumer); in tryAdvance() [all …]
|
D | Node.java | 81 void forEach(Consumer<? super T> consumer); in forEach() argument 326 default void forEach(Consumer<? super Integer> consumer) { in forEach() argument 327 if (consumer instanceof IntConsumer) { in forEach() 328 forEach((IntConsumer) consumer); in forEach() 333 spliterator().forEachRemaining(consumer); in forEach() 399 default void forEach(Consumer<? super Long> consumer) { in forEach() argument 400 if (consumer instanceof LongConsumer) { in forEach() 401 forEach((LongConsumer) consumer); in forEach() 406 spliterator().forEachRemaining(consumer); in forEach() 472 default void forEach(Consumer<? super Double> consumer) { in forEach() argument [all …]
|
D | StreamSpliterators.java | 298 public boolean tryAdvance(Consumer<? super P_OUT> consumer) { in tryAdvance() argument 299 Objects.requireNonNull(consumer); in tryAdvance() 302 consumer.accept(buffer.get(nextToConsume)); in tryAdvance() 307 public void forEachRemaining(Consumer<? super P_OUT> consumer) { in forEachRemaining() argument 309 Objects.requireNonNull(consumer); in forEachRemaining() 312 ph.wrapAndCopyInto((Sink<P_OUT>) consumer::accept, spliterator); in forEachRemaining() 316 do { } while (tryAdvance(consumer)); in forEachRemaining() 356 public boolean tryAdvance(IntConsumer consumer) { in tryAdvance() argument 357 Objects.requireNonNull(consumer); in tryAdvance() 360 consumer.accept(buffer.get(nextToConsume)); in tryAdvance() [all …]
|
D | Nodes.java | 572 public void forEach(T_CONS consumer) { } in forEach() argument 682 public void forEach(Consumer<? super T> consumer) { in forEach() argument 684 consumer.accept(array[i]); in forEach() 730 public void forEach(Consumer<? super T> consumer) { in forEach() argument 731 c.forEach(consumer); in forEach() 811 public void forEach(Consumer<? super T> consumer) { in forEach() argument 812 left.forEach(consumer); in forEach() 813 right.forEach(consumer); in forEach() 851 public void forEach(T_CONS consumer) { in forEach() argument 852 left.forEach(consumer); in forEach() [all …]
|
D | DoublePipeline.java | 385 public void forEach(DoubleConsumer consumer) { 386 evaluate(ForEachOps.makeDouble(consumer, false)); 390 public void forEachOrdered(DoubleConsumer consumer) { 391 evaluate(ForEachOps.makeDouble(consumer, true)); 580 public void forEach(DoubleConsumer consumer) { 582 adapt(sourceStageSpliterator()).forEachRemaining(consumer); 585 super.forEach(consumer); 590 public void forEachOrdered(DoubleConsumer consumer) { 592 adapt(sourceStageSpliterator()).forEachRemaining(consumer); 595 super.forEachOrdered(consumer);
|
/libcore/ojluni/src/main/java/java/util/ |
D | SplittableRandom.java | 858 public boolean tryAdvance(IntConsumer consumer) { in tryAdvance() argument 859 if (consumer == null) throw new NullPointerException(); in tryAdvance() 862 consumer.accept(rng.internalNextInt(origin, bound)); in tryAdvance() 869 public void forEachRemaining(IntConsumer consumer) { in forEachRemaining() argument 870 if (consumer == null) throw new NullPointerException(); in forEachRemaining() 877 consumer.accept(r.internalNextInt(o, b)); in forEachRemaining() 914 public boolean tryAdvance(LongConsumer consumer) { in tryAdvance() argument 915 if (consumer == null) throw new NullPointerException(); in tryAdvance() 918 consumer.accept(rng.internalNextLong(origin, bound)); in tryAdvance() 925 public void forEachRemaining(LongConsumer consumer) { in forEachRemaining() argument [all …]
|
D | Random.java | 1025 public boolean tryAdvance(IntConsumer consumer) { in tryAdvance() argument 1026 if (consumer == null) throw new NullPointerException(); in tryAdvance() 1029 consumer.accept(rng.internalNextInt(origin, bound)); in tryAdvance() 1036 public void forEachRemaining(IntConsumer consumer) { in forEachRemaining() argument 1037 if (consumer == null) throw new NullPointerException(); in forEachRemaining() 1044 consumer.accept(r.internalNextInt(o, b)); in forEachRemaining() 1080 public boolean tryAdvance(LongConsumer consumer) { in tryAdvance() argument 1081 if (consumer == null) throw new NullPointerException(); in tryAdvance() 1084 consumer.accept(rng.internalNextLong(origin, bound)); in tryAdvance() 1091 public void forEachRemaining(LongConsumer consumer) { in forEachRemaining() argument [all …]
|
D | OptionalInt.java | 136 public void ifPresent(IntConsumer consumer) { in ifPresent() argument 138 consumer.accept(value); in ifPresent()
|
D | OptionalLong.java | 136 public void ifPresent(LongConsumer consumer) { in ifPresent() argument 138 consumer.accept(value); in ifPresent()
|
D | OptionalDouble.java | 136 public void ifPresent(DoubleConsumer consumer) { in ifPresent() argument 138 consumer.accept(value); in ifPresent()
|
D | Optional.java | 153 public void ifPresent(Consumer<? super T> consumer) { in ifPresent() argument 155 consumer.accept(value); in ifPresent()
|
D | ArrayDeque.java | 952 public void forEachRemaining(Consumer<? super E> consumer) { in forEachRemaining() argument 953 if (consumer == null) in forEachRemaining() 963 consumer.accept(e); in forEachRemaining() 967 public boolean tryAdvance(Consumer<? super E> consumer) { in tryAdvance() argument 968 if (consumer == null) in tryAdvance() 977 consumer.accept(e); in tryAdvance()
|
D | ArrayList.java | 890 public void forEachRemaining(Consumer<? super E> consumer) { in forEachRemaining() argument 891 Objects.requireNonNull(consumer); in forEachRemaining() 902 consumer.accept((E) elementData[i++]); in forEachRemaining() 1163 public void forEachRemaining(Consumer<? super E> consumer) { in listIterator() argument 1164 Objects.requireNonNull(consumer); in listIterator() 1175 consumer.accept((E) elementData[offset + (i++)]); in listIterator()
|
D | Spliterators.java | 844 public boolean tryAdvance(C consumer) { in tryAdvance() argument 845 Objects.requireNonNull(consumer); in tryAdvance() 849 public void forEachRemaining(C consumer) { in forEachRemaining() argument 850 Objects.requireNonNull(consumer); in forEachRemaining()
|
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ |
D | StreamSpliteratorTest.java | 88 public boolean tryAdvance(Consumer<? super T> consumer) { in tryAdvance() argument 91 return sp.tryAdvance(consumer); in tryAdvance() 95 public void forEachRemaining(Consumer<? super T> consumer) { in forEachRemaining() argument 97 sp.forEachRemaining(consumer); in forEachRemaining() 136 public boolean tryAdvance(Consumer<? super Integer> consumer) { in tryAdvance() argument 137 return Spliterator.OfInt.super.tryAdvance(consumer); in tryAdvance() 141 public void forEachRemaining(Consumer<? super Integer> consumer) { in forEachRemaining() argument 142 Spliterator.OfInt.super.forEachRemaining(consumer); in forEachRemaining() 146 public boolean tryAdvance(IntConsumer consumer) { in tryAdvance() argument 149 return psp.tryAdvance(consumer); in tryAdvance() [all …]
|
D | IntPrimitiveOpsTests.java | 157 AssertingConsumer consumer = new AssertingConsumer(expected); in testSequential() local 158 IntStream.range(1, 1000).sequential().forEach(consumer); in testSequential() 159 assertEquals(expected.length, consumer.getCount()); in testSequential() 163 AssertingConsumer consumer = new AssertingConsumer(expected); in testSequential() local 164 IntStream.range(1, 1000).parallel().sequential().forEach(consumer); in testSequential() 165 assertEquals(expected.length, consumer.getCount()); in testSequential()
|
D | LongPrimitiveOpsTests.java | 157 AssertingConsumer consumer = new AssertingConsumer(expected); in testSequential() local 158 LongStream.range(1, 1000).sequential().forEach(consumer); in testSequential() 159 assertEquals(expected.length, consumer.getCount()); in testSequential() 163 AssertingConsumer consumer = new AssertingConsumer(expected); in testSequential() local 164 LongStream.range(1, 1000).parallel().sequential().forEach(consumer); in testSequential() 165 assertEquals(expected.length, consumer.getCount()); in testSequential()
|
/libcore/ojluni/src/main/java/java/util/concurrent/ |
D | ThreadLocalRandom.java | 767 public boolean tryAdvance(IntConsumer consumer) { in tryAdvance() argument 768 if (consumer == null) throw new NullPointerException(); in tryAdvance() 771 consumer.accept(ThreadLocalRandom.current().internalNextInt(origin, bound)); in tryAdvance() 778 public void forEachRemaining(IntConsumer consumer) { in forEachRemaining() argument 779 if (consumer == null) throw new NullPointerException(); in forEachRemaining() 786 consumer.accept(rng.internalNextInt(o, b)); in forEachRemaining() 822 public boolean tryAdvance(LongConsumer consumer) { in tryAdvance() argument 823 if (consumer == null) throw new NullPointerException(); in tryAdvance() 826 consumer.accept(ThreadLocalRandom.current().internalNextLong(origin, bound)); in tryAdvance() 833 public void forEachRemaining(LongConsumer consumer) { in forEachRemaining() argument [all …]
|
/libcore/ojluni/annotations/hiddenapi/java/util/ |
D | Random.java | 237 public boolean tryAdvance(java.util.function.DoubleConsumer consumer) { in tryAdvance() argument 241 public void forEachRemaining(java.util.function.DoubleConsumer consumer) { in forEachRemaining() argument 291 public boolean tryAdvance(java.util.function.IntConsumer consumer) { in tryAdvance() argument 295 public void forEachRemaining(java.util.function.IntConsumer consumer) { in forEachRemaining() argument 346 public boolean tryAdvance(java.util.function.LongConsumer consumer) { in tryAdvance() argument 350 public void forEachRemaining(java.util.function.LongConsumer consumer) { in forEachRemaining() argument
|
D | ArrayDeque.java | 270 public void forEachRemaining(java.util.function.Consumer<? super E> consumer) { in forEachRemaining() argument 274 public boolean tryAdvance(java.util.function.Consumer<? super E> consumer) { in tryAdvance() argument
|
D | ArrayList.java | 303 public void forEachRemaining(java.util.function.Consumer<? super E> consumer) { in forEachRemaining() argument
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | SpliteratorTester.java | 46 Consumer<T> consumer = (T value) -> recorder.add(value); in runBasicIterationTests() local 49 boolean didAdvance = spliterator.tryAdvance(consumer); in runBasicIterationTests() 53 spliterator.forEachRemaining(consumer); in runBasicIterationTests() 57 assertFalse(spliterator.tryAdvance(consumer)); in runBasicIterationTests() 64 Consumer<T> consumer = (T value) -> recorder.add(value); in runBasicIterationTests_unordered() local 68 assertFalse(spliterator.tryAdvance(consumer)); in runBasicIterationTests_unordered() 70 assertTrue(spliterator.tryAdvance(consumer)); in runBasicIterationTests_unordered() 75 spliterator.forEachRemaining(consumer); in runBasicIterationTests_unordered() 81 assertFalse(spliterator.tryAdvance(consumer)); in runBasicIterationTests_unordered()
|
/libcore/libart/src/main/java/dalvik/system/ |
D | VMRuntime.java | 730 public static void setNonSdkApiUsageConsumer(Consumer<String> consumer) { in setNonSdkApiUsageConsumer() argument 731 nonSdkApiUsageConsumer = consumer; in setNonSdkApiUsageConsumer()
|