Home
last modified time | relevance | path

Searched refs:toList (Results 1 – 25 of 67) sorted by relevance

123

/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/
DToListOpTest.java49 assertCountSum(countTo(0).stream().toList(), 0, 0); in testToList()
50 assertCountSum(countTo(10).stream().toList(), 10, 55); in testToList()
69 List<Integer> objects = exerciseTerminalOps(data, s -> s.toList()); in testOps()
76 List<Integer> objects = exerciseTerminalOps(data, s -> s.toList()); in testOpsWithNull()
83 …ist<Integer> objects = exerciseTerminalOps(data, s -> DefaultMethodStreams.delegateTo(s).toList()); in testDefaultOps()
90 …ist<Integer> objects = exerciseTerminalOps(data, s -> DefaultMethodStreams.delegateTo(s).toList()); in testDefaultOpsWithNull()
DCollectorsTest.java69 import static java.util.stream.Collectors.toList;
555 groupingBy(classifier, mapping(mapper, toList())),
566 …t<Integer>> m = Stream.of(1, 2).collect(groupingBy(classifier, flatMapping(flatMapper, toList())));
578 groupingBy(classifier, flatMapping(flatMapperByNull, toList())),
583 groupingBy(classifier, flatMapping(flatMapperBy0, toList())),
588 groupingBy(classifier, flatMapping(flatMapperBy2, toList())),
603 groupingBy(classifier, filtering(filteringByMod2, toList())),
608 groupingBy(classifier, filtering(filteringByUnder100, toList())),
613 groupingBy(classifier, filtering(filteringByTrue, toList())),
618 groupingBy(classifier, filtering(filteringByFalse, toList())),
[all …]
/libcore/ojluni/src/test/java/util/stream/boottest/java/util/stream/
DSliceSpliteratorTest.java34 import static java.util.stream.Collectors.toList;
74 … final Collection<Integer> source = IntStream.range(0, size).boxed().collect(toList()); in sliceSpliteratorDataProvider()
87 … final Collection<Integer> source = IntStream.range(0, size).boxed().collect(toList()); in sliceSpliteratorDataProvider()
100 … final Collection<Long> source = LongStream.range(0, size).boxed().collect(toList()); in sliceSpliteratorDataProvider()
113 … Collection<Double> source = LongStream.range(0, size).asDoubleStream().boxed().collect(toList()); in sliceSpliteratorDataProvider()
129 … final Collection<Integer> source = IntStream.range(0, size).boxed().collect(toList()); in sliceSpliteratorDataProvider()
143 … final Collection<Integer> source = IntStream.range(0, size).boxed().collect(toList()); in sliceSpliteratorDataProvider()
157 … final Collection<Long> source = LongStream.range(0, size).boxed().collect(toList()); in sliceSpliteratorDataProvider()
171 … Collection<Double> source = LongStream.range(0, size).asDoubleStream().boxed().collect(toList()); in sliceSpliteratorDataProvider()
DSpinedBufferTest.java49 .collect(Collectors.toList());
113 .collect(Collectors.toList()); in testLastSplit()
188 .collect(Collectors.toList()); in testIntLastSplit()
263 .collect(Collectors.toList()); in testLongLastSplit()
339 .collect(Collectors.toList()); in testLongLastSplit()
/libcore/luni/src/test/java/libcore/java/util/
DSplittableRandomTest.java91 var splitRandom1 = random1.splits(size, new SplittableRandom(sourceSeed)).toList(); in splitsInstances_areTheSame_whenTheyAreSplitWithIdenticalSource_boundedStream()
92 var splitRandom2 = random2.splits(size, new SplittableRandom(sourceSeed)).toList(); in splitsInstances_areTheSame_whenTheyAreSplitWithIdenticalSource_boundedStream()
113 var splitRandom1 = random1.splits(new SplittableRandom(sourceSeed)).limit(size).toList(); in splitsInstances_areTheSame_whenTheyAreSplitWithIdenticalSource_unboundedStream()
114 var splitRandom2 = random2.splits(new SplittableRandom(sourceSeed)).limit(size).toList(); in splitsInstances_areTheSame_whenTheyAreSplitWithIdenticalSource_unboundedStream()
133 var splitRandom1 = random1.splits(size).toList(); in splitsInstances_areTheSame_whenSourceIsIdentical()
134 var splitRandom2 = random2.splits(size).toList(); in splitsInstances_areTheSame_whenSourceIsIdentical()
DSpliteratorTester.java178 private static<T> List<T> toList(Iterator<T> iterator) { in toList() method in SpliteratorTester
186 private static<T> List<T> toList(Spliterator<T> spliterator) { in toList() method in SpliteratorTester
193 List<T> elements = toList(spliterable.spliterator()); in runOrderedTests()
194 assertEquals("Ordering should be consistent", elements, toList(spliterable.spliterator())); in runOrderedTests()
201 + spliterable.getClass(), elements, toList(spliterable.iterator())); in runOrderedTests()
221 assertEquals(toList(saSplit), toList(sbSplit)); in runOrderedTests()
222 assertEquals(toList(sa), toList(sb)); in runOrderedTests()
224 assertEquals(elements, toList(sa)); in runOrderedTests()
225 assertEquals(elements, toList(sb)); in runOrderedTests()
DServiceLoaderTest.java61 var result = serviceLoader.stream().toList(); in test_stream_emptyLoader()
69 var providerTypes = serviceLoader.stream().map(ServiceLoader.Provider::type).toList(); in test_streamTypes_nonEmptyLoader()
80 .toList(); in test_stream_providerGet_nonEmptyLoader()
DOptionalLongTest.java127 var elements = OptionalLong.of(42).stream().boxed().toList(); in test_stream_nonEmpty()
133 var elements = OptionalLong.empty().stream().boxed().toList(); in test_stream_empty()
/libcore/luni/src/test/java/libcore/libcore/util/
DCollectionUtilsTest.java41 assertEquals(Arrays.<String>asList("a", "b", "c", "d", "e"), toList(strings)); in testDereferenceIterable()
44 assertEquals(Arrays.<String>asList("a", "c", "d", "e"), toList(strings)); in testDereferenceIterable()
66 assertEquals(Arrays.<String>asList(), toList(strings)); in testDereferenceIterable()
69 private <T> List<T> toList(Iterable<T> iterable) { in toList() method in CollectionUtilsTest
/libcore/luni/src/test/dex_src/libcore/java/lang/stackwalker/
DTest1.java22 import static java.util.stream.Collectors.toList;
33 return walker.walk(s -> s.collect(toList())); in invokeWalker()
/libcore/ojluni/src/test/java/util/Random/
DRandomStreamTest.java43 import static java.util.stream.Collectors.toList;
133 … testRandomResultSupplierConcurrently(() -> tlr.ints().limit(SIZE).boxed().collect(toList())); in testThreadLocalIntStream()
139 … testRandomResultSupplierConcurrently(() -> tlr.longs().limit(SIZE).boxed().collect(toList())); in testThreadLocalLongStream()
145 … testRandomResultSupplierConcurrently(() -> tlr.doubles().limit(SIZE).boxed().collect(toList())); in testThreadLocalDoubleStream()
152 limit(tasks).collect(toList()); in testRandomResultSupplierConcurrently()
/libcore/ojluni/src/test/java/util/stream/examples/
DJavadocExamples.java53 .collect(Collectors.toList()); in testNumberIntegerExample()
62 assertEquals(expandedStream.toList(), List.of(1,2,3,4,5)); in testExpandIterableExample()
/libcore/luni/src/test/java/libcore/java/util/stream/
DCollectorsTest.java26 import static java.util.stream.Collectors.toList;
98 Collectors.mapping((Integer x) -> x + 1, toList()); in mapping_asArgumentToCollect()
108 Collectors.mapping((Integer x) -> x + 1, toList()); in mapping_asArgumentInGroupingBy()
/libcore/luni/src/test/java/libcore/java/util/random/
DSplittableGeneratorTest.java41 var splitRandom1 = random1.splits().limit(size).toList(); in splits_produceTheSameResult_whenSourceIsIdentical()
42 var splitRandom2 = random2.splits().limit(size).toList(); in splits_produceTheSameResult_whenSourceIsIdentical()
/libcore/ojluni/src/test/java/util/stream/Collectors/
DCollectorsTest.java67 import static java.util.stream.Collectors.toList;
537 groupingBy(classifier, mapping(mapper, toList())),
548 …t<Integer>> m = Stream.of(1, 2).collect(groupingBy(classifier, flatMapping(flatMapper, toList())));
560 groupingBy(classifier, flatMapping(flatMapperByNull, toList())),
565 groupingBy(classifier, flatMapping(flatMapperBy0, toList())),
570 groupingBy(classifier, flatMapping(flatMapperBy2, toList())),
585 groupingBy(classifier, filtering(filteringByMod2, toList())),
590 groupingBy(classifier, filtering(filteringByUnder100, toList())),
595 groupingBy(classifier, filtering(filteringByTrue, toList())),
600 groupingBy(classifier, filtering(filteringByFalse, toList())),
[all …]
/libcore/ojluni/src/test/java/util/Optional/
DBasic.java49 import static java.util.stream.Collectors.toList;
231 assertEquals(Optional_stream(Optional.empty()).collect(toList()), List.of()); in testStreamEmpty()
238 assertEquals(Optional_stream(Optional.of("xyzzy")).collect(toList()), List.of("xyzzy")); in testStreamPresent()
284 assertEquals(s.collect(Collectors.toList()), List.of()); in testStream_empty()
292 assertEquals(s.collect(Collectors.toList()), List.of(3)); in testStream_present()
/libcore/ojluni/src/test/java/lang/String/
DStrip.java106 .collect(Collectors.toList())); in report()
111 .collect(Collectors.toList())); in report()
/libcore/ojluni/src/test/java/math/BigInteger/
DPrimeTest.java44 import static java.util.stream.Collectors.toList;
154 .filter(b -> !b.isProbablePrime(certainty)).collect(toList());
/libcore/ojluni/src/test/java/lang/StackWalker/
DStackStreamTest.java128 .collect(Collectors.toList()); in g()
137 .collect(Collectors.toList());} in g()
159 … .collect(Collectors.mapping(StackFrame::toStackTraceElement, Collectors.toList())); in g()
DBasic.java170 .collect(Collectors.toList()); in parse()
224 result = walker.walk(s -> s.limit(limit).collect(Collectors.toList())); in walk()
DNativeMethod.java61 .collect(Collectors.toList()) in walk()
/libcore/ojluni/src/test/java/util/stream/bootlib/java/util/stream/
DStreamTestScenario.java61 for (U t : m.apply(data.stream()).collect(Collectors.toList())) { in STREAM_COLLECT()
183 for (U u : m.apply(data.parallelStream()).collect(Collectors.toList())) in PAR_STREAM_COLLECT_TO_LIST()
192 for (U u : m.apply(data.stream().parallel()).collect(Collectors.toList())) in STREAM_TO_PAR_STREAM_COLLECT_TO_LIST()
201 for (U u : m.apply(data.parallelStream().sequential()).collect(Collectors.toList())) in PAR_STREAM_TO_STREAM_COLLECT_TO_LIST()
/libcore/ojluni/src/test/java/util/stream/testlib/org/openjdk/testlib/java/util/stream/
DStreamTestScenario.java64 for (U t : m.apply(data.stream()).collect(Collectors.toList())) { in STREAM_COLLECT()
186 for (U u : m.apply(data.parallelStream()).collect(Collectors.toList())) in PAR_STREAM_COLLECT_TO_LIST()
195 for (U u : m.apply(data.stream().parallel()).collect(Collectors.toList())) in STREAM_TO_PAR_STREAM_COLLECT_TO_LIST()
204 for (U u : m.apply(data.parallelStream().sequential()).collect(Collectors.toList())) in PAR_STREAM_TO_STREAM_COLLECT_TO_LIST()
/libcore/ojluni/src/test/java/lang/invoke/VarHandles/
DVarHandleBaseTest.java41 import static java.util.stream.Collectors.toList;
214 return Stream.of(TestAccessMode.values()).collect(toList()); in testAccessModes()
220 .collect(toList()); in testAccessModesOfType()
224 return Stream.of(VarHandle.AccessMode.values()).collect(toList()); in accessModes()
231 .collect(toList()); in accessModesOfType()
/libcore/tools/openjdk-analyzer/src/libcore/tools/analyzer/openjdk/
DMain.java19 import static java.util.stream.Collectors.toList;
170 .collect(toList()); in analyze()
173 .collect(toList()); in analyze()
178 .collect(toList()); in analyze()
188 .collect(toList()); in analyze()
191 .collect(toList()); in analyze()
196 .collect(toList()); in analyze()

123