Home
last modified time | relevance | path

Searched refs:tryAdvance (Results 1 – 25 of 83) sorted by relevance

1234

/libcore/ojluni/src/main/java/java/util/
DSpliterator.java312 boolean tryAdvance(Consumer<? super T> action); in tryAdvance() method
332 do { } while (tryAdvance(action)); in forEachRemaining()
632 boolean tryAdvance(T_CONS action); in tryAdvance() method
654 do { } while (tryAdvance(action)); in forEachRemaining()
668 boolean tryAdvance(IntConsumer action); in tryAdvance() method
672 do { } while (tryAdvance(action)); in forEachRemaining()
686 default boolean tryAdvance(Consumer<? super Integer> action) { in tryAdvance() method
688 return tryAdvance((IntConsumer) action); in tryAdvance()
694 return tryAdvance((IntConsumer) action::accept); in tryAdvance()
732 boolean tryAdvance(LongConsumer action); in tryAdvance() method
[all …]
DSpliterators.java681 spliterator.tryAdvance(this); in iterator()
740 spliterator.tryAdvance(this); in iterator()
795 spliterator.tryAdvance(this); in iterator()
850 spliterator.tryAdvance(this); in iterator()
888 public boolean tryAdvance(C consumer) { in tryAdvance() method in Spliterators.EmptySpliterator
997 public boolean tryAdvance(Consumer<? super T> action) { in tryAdvance() method in Spliterators.ArraySpliterator
1081 public boolean tryAdvance(IntConsumer action) { in tryAdvance() method in Spliterators.IntArraySpliterator
1164 public boolean tryAdvance(LongConsumer action) { in tryAdvance() method in Spliterators.LongArraySpliterator
1247 public boolean tryAdvance(DoubleConsumer action) { in tryAdvance() method in Spliterators.DoubleArraySpliterator
1355 if (s > 1 && tryAdvance(holder)) { in trySplit()
[all …]
/libcore/luni/src/test/java/libcore/java/util/
DSpliteratorsTest.java48 empty.tryAdvance(alwaysFails); in testEmptyIntSpliterator()
49 empty.tryAdvance(alwaysFailsBoxed); in testEmptyIntSpliterator()
64 empty.tryAdvance(alwaysFails); in testEmptyRefSpliterator()
78 empty.tryAdvance(alwaysFails); in testEmptyLongSpliterator()
79 empty.tryAdvance(alwaysFailsBoxed); in testEmptyLongSpliterator()
95 empty.tryAdvance(alwaysFails); in testEmptyDoubleSpliterator()
96 empty.tryAdvance(alwaysFailsBoxed); in testEmptyDoubleSpliterator()
223 assertTrue(intSp.tryAdvance((Integer value) -> assertEquals(1, (int) value))); in test_spliterator_int()
224 assertTrue(intSp.tryAdvance((int value) -> assertEquals(2, (int) value))); in test_spliterator_int()
233 assertTrue(split1.tryAdvance((int value) -> recorder.add(value))); in test_spliterator_int()
[all …]
DSpliteratorTest.java46 public boolean tryAdvance(IntConsumer action) { in tryAdvance() method in SpliteratorTest.PrimitiveIntegerSpliterator
66 public boolean tryAdvance(Consumer<? super Integer> action) { in tryAdvance() method in SpliteratorTest.PrimitiveIntegerSpliterator
68 return tryAdvance(action); in tryAdvance()
70 return tryAdvance((IntConsumer) action::accept); in tryAdvance()
DSpliteratorTester.java49 boolean didAdvance = spliterator.tryAdvance(consumer); in runBasicIterationTests()
57 assertFalse(spliterator.tryAdvance(consumer)); in runBasicIterationTests()
68 assertFalse(spliterator.tryAdvance(consumer)); in runBasicIterationTests_unordered()
70 assertTrue(spliterator.tryAdvance(consumer)); in runBasicIterationTests_unordered()
81 assertFalse(spliterator.tryAdvance(consumer)); in runBasicIterationTests_unordered()
87 spliterator.tryAdvance(value -> recorder.add(value)); in recordAndAssertBasicIteration()
91 assertFalse(spliterator.tryAdvance(value -> recorder.add(value))); in recordAndAssertBasicIteration()
92 spliterator.tryAdvance(value -> fail()); in recordAndAssertBasicIteration()
100 spliterator.tryAdvance(null); in testSpliteratorNPE()
123 boolean didAdvance = spliterator.tryAdvance(value -> recorder.add(value)); in runBasicSplitTests()
[all …]
DAbstractListTest.java77 boolean didAdvance = spliterator.tryAdvance(value -> receivedValue.set(value)); in spliterator_lateBinding()
89 assertTrue(spliterator.tryAdvance(value -> {})); in spliterator_modification_failFast()
90 assertTrue(spliterator.tryAdvance(value -> {})); in spliterator_modification_failFast()
94 spliterator.tryAdvance(value -> receivedValue.set(value)); in spliterator_modification_failFast()
/libcore/ojluni/src/test/java/util/stream/testlib/org/openjdk/testlib/java/util/stream/
DSpliteratorTestHelper.java179 executeAndCatch(NullPointerException.class, () -> psp.tryAdvance((IntConsumer) null)); in testNullPointerException()
184 executeAndCatch(NullPointerException.class, () -> psp.tryAdvance((LongConsumer) null)); in testNullPointerException()
189 … executeAndCatch(NullPointerException.class, () -> psp.tryAdvance((DoubleConsumer) null)); in testNullPointerException()
193 executeAndCatch(NullPointerException.class, () -> sp.tryAdvance(null)); in testNullPointerException()
215 spliterator.tryAdvance(boxingAdapter.apply( in testForEach()
239 while (spliterator.tryAdvance(addToFromTryAdvance)) { } in testTryAdvance()
245 spliterator.tryAdvance(boxingAdapter.apply( in testTryAdvance()
270 for (int i = 0; i < 10 && spliterator.tryAdvance(addToDest); i++) { } in testMixedTryAdvanceForEach()
277 spliterator.tryAdvance(boxingAdapter.apply( in testMixedTryAdvanceForEach()
303 spliterator.tryAdvance(b); in testMixedTraverseAndSplit()
[all …]
DLongStreamTestScenario.java82 … for (Spliterator.OfLong spl = m.apply(data.stream()).spliterator(); spl.tryAdvance(b); ) { in STREAM_SPLITERATOR()
123 … for (Spliterator.OfLong spl = m.apply(data.parallelStream()).spliterator(); spl.tryAdvance(b); ) { in PAR_STREAM_SPLITERATOR()
/libcore/ojluni/src/test/java/util/stream/bootlib/java/util/stream/
DSpliteratorTestHelper.java179 executeAndCatch(NullPointerException.class, () -> psp.tryAdvance((IntConsumer) null)); in testNullPointerException()
184 executeAndCatch(NullPointerException.class, () -> psp.tryAdvance((LongConsumer) null)); in testNullPointerException()
189 … executeAndCatch(NullPointerException.class, () -> psp.tryAdvance((DoubleConsumer) null)); in testNullPointerException()
193 executeAndCatch(NullPointerException.class, () -> sp.tryAdvance(null)); in testNullPointerException()
215 spliterator.tryAdvance(boxingAdapter.apply( in testForEach()
239 while (spliterator.tryAdvance(addToFromTryAdvance)) { } in testTryAdvance()
245 spliterator.tryAdvance(boxingAdapter.apply( in testTryAdvance()
270 for (int i = 0; i < 10 && spliterator.tryAdvance(addToDest); i++) { } in testMixedTryAdvanceForEach()
277 spliterator.tryAdvance(boxingAdapter.apply( in testMixedTryAdvanceForEach()
303 spliterator.tryAdvance(b); in testMixedTraverseAndSplit()
[all …]
DLongStreamTestScenario.java79 … for (Spliterator.OfLong spl = m.apply(data.stream()).spliterator(); spl.tryAdvance(b); ) { in STREAM_SPLITERATOR()
120 … for (Spliterator.OfLong spl = m.apply(data.parallelStream()).spliterator(); spl.tryAdvance(b); ) { in PAR_STREAM_SPLITERATOR()
/libcore/ojluni/src/test/java/util/stream/testlib/org/openjdk/testlib/java/util/
DSpliteratorTestHelper.java227 assertThrowsNPE(() -> psp.tryAdvance((IntConsumer) null)); in testNullPointerException()
232 assertThrowsNPE(() -> psp.tryAdvance((LongConsumer) null)); in testNullPointerException()
237 assertThrowsNPE(() -> psp.tryAdvance((DoubleConsumer) null)); in testNullPointerException()
241 assertThrowsNPE(() -> sp.tryAdvance(null)); in testNullPointerException()
263 spliterator.tryAdvance(boxingAdapter.apply( in testForEach()
290 while (spliterator.tryAdvance(addToFromTryAdvance)) { } in testTryAdvance()
296 spliterator.tryAdvance(boxingAdapter.apply( in testTryAdvance()
321 for (int i = 0; i < 10 && spliterator.tryAdvance(addToDest); i++) { } in testMixedTryAdvanceForEach()
328 spliterator.tryAdvance(boxingAdapter.apply( in testMixedTryAdvanceForEach()
354 spliterator.tryAdvance(b); in testMixedTraverseAndSplit()
[all …]
/libcore/ojluni/src/main/java/java/util/stream/
DStreamSpliterators.java292 pusher = () -> spliterator.tryAdvance(bufferSink);
296 public boolean tryAdvance(Consumer<? super P_OUT> consumer) { in tryAdvance() method
314 do { } while (tryAdvance(consumer)); in forEachRemaining()
345 pusher = () -> spliterator.tryAdvance(bufferSink); in initPartialTraversalState()
354 public boolean tryAdvance(IntConsumer consumer) { in tryAdvance() method in StreamSpliterators.AbstractWrappingSpliterator.IntWrappingSpliterator
372 do { } while (tryAdvance(consumer)); in forEachRemaining()
403 pusher = () -> spliterator.tryAdvance(bufferSink); in initPartialTraversalState()
412 public boolean tryAdvance(LongConsumer consumer) { in tryAdvance() method in StreamSpliterators.AbstractWrappingSpliterator.LongWrappingSpliterator
430 do { } while (tryAdvance(consumer)); in forEachRemaining()
461 pusher = () -> spliterator.tryAdvance(bufferSink); in initPartialTraversalState()
[all …]
DStreams.java76 public boolean tryAdvance(IntConsumer consumer) { in tryAdvance() method in Streams.RangeIntSpliterator
201 public boolean tryAdvance(LongConsumer consumer) { in tryAdvance() method in Streams.RangeLongSpliterator
393 public boolean tryAdvance(Consumer<? super T> action) { in tryAdvance() method in Streams.StreamBuilderImpl
484 public boolean tryAdvance(IntConsumer action) { in tryAdvance() method in Streams.IntStreamBuilderImpl
575 public boolean tryAdvance(LongConsumer action) { in tryAdvance() method in Streams.LongStreamBuilderImpl
666 public boolean tryAdvance(DoubleConsumer action) { in tryAdvance() method in Streams.DoubleStreamBuilderImpl
717 public boolean tryAdvance(Consumer<? super T> consumer) {
720 hasNext = aSpliterator.tryAdvance(consumer);
723 hasNext = bSpliterator.tryAdvance(consumer);
727 hasNext = bSpliterator.tryAdvance(consumer);
[all …]
DNode.java129 for (int i = 0; i < from && spliterator.tryAdvance(e -> { }); i++) { } in truncate()
133 for (int i = 0; i < size && spliterator.tryAdvance(nodeBuilder); i++) { } in truncate()
368 for (int i = 0; i < from && spliterator.tryAdvance((IntConsumer) e -> { }); i++) { } in truncate()
372 … for (int i = 0; i < size && spliterator.tryAdvance((IntConsumer) nodeBuilder); i++) { } in truncate()
445 for (int i = 0; i < from && spliterator.tryAdvance((LongConsumer) e -> { }); i++) { } in truncate()
449 … for (int i = 0; i < size && spliterator.tryAdvance((LongConsumer) nodeBuilder); i++) { } in truncate()
524 for (int i = 0; i < from && spliterator.tryAdvance((DoubleConsumer) e -> { }); i++) { } in truncate()
528 … for (int i = 0; i < size && spliterator.tryAdvance((DoubleConsumer) nodeBuilder); i++) { } in truncate()
DWhileOps.java772 public boolean tryAdvance(Consumer<? super T> action) {
776 s.tryAdvance(this) && // and if advanced one element
814 public boolean tryAdvance(Consumer<? super T> action) {
819 while ((adv = s.tryAdvance(this)) && // If advanced one element
836 return s.tryAdvance(action);
877 public boolean tryAdvance(IntConsumer action) {
881 s.tryAdvance(this) && // and if advanced one element
919 public boolean tryAdvance(IntConsumer action) {
924 while ((adv = s.tryAdvance(this)) && // If advanced one element
941 return s.tryAdvance(action);
[all …]
DReferencePipeline.java138 do { } while (!(cancelled = sink.cancellationRequested()) && spliterator.tryAdvance(sink)); in forEachWithCancel()
295 … do { } while (!downstream.cancellationRequested() && s.tryAdvance(downstream));
344 … do { } while (!downstream.cancellationRequested() && s.tryAdvance(downstreamAsInt));
389 … do { } while (!downstream.cancellationRequested() && s.tryAdvance(downstreamAsDouble));
435 … do { } while (!downstream.cancellationRequested() && s.tryAdvance(downstreamAsLong));
DDoubleStream.java1010 public boolean tryAdvance(DoubleConsumer action) { in iterate()
1072 public boolean tryAdvance(DoubleConsumer action) { in iterate()
DIntStream.java951 public boolean tryAdvance(IntConsumer action) { in iterate()
1013 public boolean tryAdvance(IntConsumer action) { in iterate()
DLongStream.java940 public boolean tryAdvance(LongConsumer action) { in iterate()
1002 public boolean tryAdvance(LongConsumer action) { in iterate()
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/
DStreamSpliteratorTest.java92 public boolean tryAdvance(Consumer<? super T> consumer) { in tryAdvance() method in StreamSpliteratorTest.ProxyNoExactSizeSpliterator
95 return sp.tryAdvance(consumer); in tryAdvance()
140 public boolean tryAdvance(Consumer<? super Integer> consumer) { in tryAdvance() method in StreamSpliteratorTest.ProxyNoExactSizeSpliterator.OfInt
141 return Spliterator.OfInt.super.tryAdvance(consumer); in tryAdvance()
150 public boolean tryAdvance(IntConsumer consumer) { in tryAdvance() method in StreamSpliteratorTest.ProxyNoExactSizeSpliterator.OfInt
153 return psp.tryAdvance(consumer); in tryAdvance()
181 public boolean tryAdvance(Consumer<? super Long> consumer) { in tryAdvance() method in StreamSpliteratorTest.ProxyNoExactSizeSpliterator.OfLong
182 return Spliterator.OfLong.super.tryAdvance(consumer); in tryAdvance()
191 public boolean tryAdvance(LongConsumer consumer) { in tryAdvance() method in StreamSpliteratorTest.ProxyNoExactSizeSpliterator.OfLong
194 return psp.tryAdvance(consumer); in tryAdvance()
[all …]
/libcore/ojluni/src/test/java/util/concurrent/tck/
DCollection8Test.java161 assertFalse(c.spliterator().tryAdvance(alwaysThrows));
205 () -> c.spliterator().tryAdvance(null),
404 assertTrue(s.tryAdvance(spliterated::add));
414 assertFalse(s.tryAdvance(alwaysThrows));
447 assertTrue(s.tryAdvance(e -> {}));
509 s.tryAdvance(tryAdvanced::add); ) {}
781 assertFalse(s.tryAdvance(alwaysThrows));
789 assertFalse(s.tryAdvance(alwaysThrows));
823 s.tryAdvance(checkSanity);
828 do {} while (s.tryAdvance(checkSanity));
[all …]
/libcore/ojluni/annotations/hiddenapi/java/util/
DRandom.java237 public boolean tryAdvance(java.util.function.DoubleConsumer consumer) { in tryAdvance() method in Random.RandomDoublesSpliterator
291 public boolean tryAdvance(java.util.function.IntConsumer consumer) { in tryAdvance() method in Random.RandomIntsSpliterator
346 public boolean tryAdvance(java.util.function.LongConsumer consumer) { in tryAdvance() method in Random.RandomLongsSpliterator
/libcore/ojluni/src/main/java/jdk/internal/util/random/
DRandomSupport.java983 public boolean tryAdvance(IntConsumer consumer) { in tryAdvance() method in RandomSupport.RandomIntsSpliterator
1041 public boolean tryAdvance(LongConsumer consumer) { in tryAdvance() method in RandomSupport.RandomLongsSpliterator
1099 public boolean tryAdvance(DoubleConsumer consumer) { in tryAdvance() method in RandomSupport.RandomDoublesSpliterator
1736 public boolean tryAdvance(IntConsumer consumer) { in tryAdvance() method in RandomSupport.AbstractArbitrarilyJumpableGenerator.RandomIntsSpliterator
1783 public boolean tryAdvance(LongConsumer consumer) { in tryAdvance() method in RandomSupport.AbstractArbitrarilyJumpableGenerator.RandomLongsSpliterator
1831 public boolean tryAdvance(DoubleConsumer consumer) { in tryAdvance() method in RandomSupport.AbstractArbitrarilyJumpableGenerator.RandomDoublesSpliterator
1887 public boolean tryAdvance(Consumer<? super RandomGenerator> consumer) { in tryAdvance() method in RandomSupport.AbstractArbitrarilyJumpableGenerator.RandomJumpsSpliterator
1932 public boolean tryAdvance(Consumer<? super JumpableGenerator> consumer) { in tryAdvance() method in RandomSupport.AbstractArbitrarilyJumpableGenerator.RandomLeapsSpliterator
1977 public boolean tryAdvance(Consumer<? super ArbitrarilyJumpableGenerator> consumer) { in tryAdvance() method in RandomSupport.AbstractArbitrarilyJumpableGenerator.RandomArbitraryJumpsSpliterator
2128 public boolean tryAdvance(IntConsumer consumer) { in tryAdvance() method in RandomSupport.AbstractSplittableGenerator.RandomIntsSpliterator
[all …]
/libcore/ojluni/src/main/java/java/nio/
DCharBufferSpliterator.java77 public boolean tryAdvance(IntConsumer action) { in tryAdvance() method in CharBufferSpliterator
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DArraysTest.java4333 assertTrue(intSp.tryAdvance((Integer value) -> assertEquals(1, (int) value))); in test_spliterator_int()
4334 assertTrue(intSp.tryAdvance((int value) -> assertEquals(2, (int) value))); in test_spliterator_int()
4343 assertTrue(split1.tryAdvance((int value) -> recorder.add(value))); in test_spliterator_int()
4344 assertTrue(split1.tryAdvance((Integer value) -> recorder.add(value))); in test_spliterator_int()
4350 assertFalse(split2.tryAdvance((int value) -> fail())); in test_spliterator_int()
4351 assertFalse(split2.tryAdvance((Integer value) -> fail())); in test_spliterator_int()
4367 sp.tryAdvance((Integer value) -> recorder.add((int) value)); in test_spliterator_intOffsetBasic()
4368 sp.tryAdvance((int value) -> recorder.add(value)); in test_spliterator_intOffsetBasic()
4380 sp.tryAdvance((Long value) -> recorder.add((long) value)); in test_spliterator_longOffsetBasic()
4381 sp.tryAdvance((long value) -> recorder.add(value)); in test_spliterator_longOffsetBasic()
[all …]

1234