Home
last modified time | relevance | path

Searched refs:collect (Results 1 – 25 of 76) sorted by relevance

1234

/libcore/ojluni/src/test/java/util/function/
DPredicateNotTest.java90 assertEquals(test.stream().filter(not(String::isEmpty)).collect(joining("\n")), expected); in test()
91 assertEquals(test.stream().filter(not(s -> s.isEmpty())).collect(joining("\n")), expected); in test()
92 … assertEquals(test.stream().filter(not(new IsEmptyPredicate())).collect(joining("\n")), expected); in test()
93 …assertEquals(test.stream().filter(not(not(not(String::isEmpty)))).collect(joining("\n")), expected… in test()
94 …assertEquals(test.stream().filter(not(not(not(s -> s.isEmpty())))).collect(joining("\n")), expecte… in test()
95 …assertEquals(test.stream().filter(not(not(not(new IsEmptyPredicate())))).collect(joining("\n")), e… in test()
/libcore/luni/src/test/java/libcore/java/util/stream/
DCollectorsTest.java45 long count = Stream.of(null, null, null).collect(counting()); in counting_countsNulls()
52 assertEquals(0L, (long) Stream.empty().collect(counting())); in counting_emptyStream()
57 long count = Stream.of(null, 1, 2, "").collect(counting()); in counting_nonEmptyStream()
68 .collect(counting()); in counting_largeStream()
92 assertArrayEquals(new int[] {30}, Stream.of(1, 2, 3, 4).collect(sqSumCollector)); in collectorOf()
100 List<Integer> actual = Stream.of(1, 2, 10).collect(plusOneCollector); in mapping_asArgumentToCollect()
111 .collect(groupingBy(x -> x % 2 == 0, plusOneCollector)); in mapping_asArgumentInGroupingBy()
/libcore/ojluni/src/test/java/lang/invoke/
DMethodHandlesAsCollectorTest.java121 … public void testAsCollector(Class<?> argType, int pos, int collect, int nargs) throws Throwable { in testAsCollector() argument
130 int collectedLength = nargs-(collect-1); in testAsCollector()
133 collectedArgs[pos] = Arrays.copyOfRange(args, pos, pos+collect); in testAsCollector()
134 System.arraycopy(args, pos+collect, collectedArgs, pos+1, args.length-(pos+collect)); in testAsCollector()
141 …System.out.println("collect "+collect+" from "+Arrays.asList(args)+" ["+pos+".."+(pos+collect)+"["… in testAsCollector()
142 MethodHandle result = target.asCollector(pos, Object[].class, collect).asType(newType); in testAsCollector()
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/
DSummaryStatisticsTest.java47 instances.add(countTo(1000).stream().collect(Collectors.summarizingInt(i -> i))); in testIntStatistics()
49 instances.add(countTo(1000).parallelStream().collect(Collectors.summarizingInt(i -> i))); in testIntStatistics()
62 instances.add(countTo(1000).stream().collect(Collectors.summarizingLong(i -> i))); in testLongStatistics()
64 instances.add(countTo(1000).parallelStream().collect(Collectors.summarizingLong(i -> i))); in testLongStatistics()
77 instances.add(countTo(1000).stream().collect(Collectors.summarizingDouble(i -> i))); in testDoubleStatistics()
79 instances.add(countTo(1000).parallelStream().collect(Collectors.summarizingDouble(i -> i))); in testDoubleStatistics()
DReduceByOpTest.java51 …Map<Boolean,List<Integer>> gbResult = data.stream().collect(groupingBy(LambdaTestHelpers.forPredic… in testOps()
52 …Map<Boolean, Integer> result = data.stream().collect(groupingBy(LambdaTestHelpers.forPredicate(pEv… in testOps()
61 … Map<Integer, List<Integer>> mgResult = exerciseTerminalOps(data, s -> s.collect(groupingBy(mId))); in testOps()
62 …Map<Integer, Integer> miResult = exerciseTerminalOps(data, s -> s.collect(groupingBy(mId, reducing… in testOps()
DTabulatorsTest.java100 assertContentsUnordered(map.keySet(), source.get().map(classifier).collect(toSet())); in assertValue()
128 Set<K> uniqueKeys = source.get().map(keyFn).collect(toSet()); in assertValue()
253 .terminal(s -> s.collect(collector))
259 .terminal(s -> s.unordered().collect(collector))
284 withData(data).terminal(s -> s.collect(collector)).expectedResult(check).exercise();
339 .terminal(s -> s.map(Object::toString).collect(Collectors.joining()))
345 .terminal(s -> s.map(Object::toString).collect(likeJoining))
350 .terminal(s -> s.map(Object::toString).collect(Collectors.joining(",")))
355 .terminal(s -> s.map(Object::toString).collect(Collectors.joining(",", "[", "]")))
361 … .collect(StringBuilder::new, StringBuilder::append, StringBuilder::append)
[all …]
/libcore/ojluni/src/test/java/util/stream/boottest/java/util/stream/
DSliceSpliteratorTest.java74 … 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/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/
DFillableStringTest.java43 String s = generate().collect(Collectors.joining()); in testStringBuilder()
48 String s = generate().collect(Collectors.joining()); in testStringBuffer()
53 String s = generate().collect(Collectors.joining("-")); in testStringJoiner()
/libcore/ojluni/src/test/java/util/stream/
DTestDoubleSumAverage.java81 DoubleSummaryStatistics stats = ds.get().collect(DoubleSummaryStatistics::new, in testForCompenstation()
94 … ds.get().boxed().collect(Collectors.summingDouble(d -> d)), 3); in testForCompenstation()
96 … ds.get().boxed().collect(Collectors.averagingDouble(d -> d)),3); in testForCompenstation()
130 DoubleSummaryStatistics stats = ds.get().collect(DoubleSummaryStatistics::new, in testNonfiniteSum()
140 …failures += compareUlpDifference(expected, ds.get().boxed().collect(Collectors.summingDouble(d -> … in testNonfiniteSum()
141 …failures += compareUlpDifference(expected, ds.get().boxed().collect(Collectors.averagingDouble(d -… in testNonfiniteSum()
/libcore/ojluni/src/test/java/util/Map/
DMapBinToFromTreeTest.java92 Collection<Integer> actual = m.keySet().stream().map(e -> e.value).collect(c); in testPutThenTraverse()
93 Collection<Integer> expected = IntStream.range(0, s).boxed().collect(c); in testPutThenTraverse()
117 Collection<Integer> actual = m.keySet().stream().map(e -> e.value).collect(c); in testRemoveThenTraverse()
118 Collection<Integer> expected = IntStream.range(i + 1, SIZE).boxed().collect(c); in testRemoveThenTraverse()
158 Collection<Integer> actual = m.keySet().stream().map(e -> e.value).collect(c); in testUntreeifyOnResizeWithTraverse()
159 Collection<Integer> expected = IntStream.rangeClosed(0, i).boxed().collect(c); in testUntreeifyOnResizeWithTraverse()
/libcore/ojluni/src/main/java/java/lang/constant/
DMethodTypeDesc.java173 .collect(Collectors.joining()), in descriptorString()
187 .collect(Collectors.joining(",")), in displayDescriptor()
/libcore/tools/openjdk-analyzer/src/libcore/tools/analyzer/openjdk/
DMain.java162 .collect(toMap(DiffAnalyzer::toApiSignature, node -> node)); in analyze()
164 .collect(toMap(DiffAnalyzer::toApiSignature, node -> node)); in analyze()
169 .collect(toList()); in analyze()
172 .collect(toList()); in analyze()
177 .collect(toList()); in analyze()
181 .collect(toMap(node -> node.name, node -> node)); in analyze()
183 .collect(toMap(node -> node.name, node -> node)); in analyze()
187 .collect(toList()); in analyze()
190 .collect(toList()); in analyze()
195 .collect(toList()); in analyze()
[all …]
/libcore/ojluni/src/test/java/util/stream/testlib/org/openjdk/testlib/java/util/stream/
DDefaultMethodStreams.java103 .collect(toSet()); in verify()
110 .collect(toSet()); in verify()
297 …public <R> R collect(Supplier<R> supplier, BiConsumer<R, ? super T> accumulator, BiConsumer<R, R> … in collect() method in DefaultMethodStreams.DefaultMethodRefStream
298 return s.collect(supplier, accumulator, combiner); in collect()
302 public <R, A> R collect(Collector<? super T, A, R> collector) { in collect() method in DefaultMethodStreams.DefaultMethodRefStream
303 return s.collect(collector); in collect()
478 …public <R> R collect(Supplier<R> supplier, ObjIntConsumer<R> accumulator, BiConsumer<R, R> combine… in collect() method in DefaultMethodStreams.DefaultMethodIntStream
479 return s.collect(supplier, accumulator, combiner); in collect()
684 …public <R> R collect(Supplier<R> supplier, ObjLongConsumer<R> accumulator, BiConsumer<R, R> combin… in collect() method in DefaultMethodStreams.DefaultMethodLongStream
685 return s.collect(supplier, accumulator, combiner); in collect()
[all …]
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/util/stream/Collectors/
DCollectorsTest.java160 assertContentsUnordered(map.keySet(), source.get().map(classifier).collect(toSet())); in assertValue()
190 Set<K> uniqueKeys = source.get().map(keyFn).collect(toSet()); in assertValue()
312 .terminal(s -> s.collect(collector))
318 .terminal(s -> s.unordered().collect(collector))
343 withData(data).terminal(s -> s.collect(collector)).expectedResult(check).exercise();
398 .terminal(s -> s.map(Object::toString).collect(Collectors.joining()))
404 .terminal(s -> s.map(Object::toString).collect(likeJoining))
409 .terminal(s -> s.map(Object::toString).collect(Collectors.joining(",")))
414 .terminal(s -> s.map(Object::toString).collect(Collectors.joining(",", "[", "]")))
420 .collect(StringBuilder::new, StringBuilder::append, StringBuilder::append)
[all …]
/libcore/ojluni/src/main/java/sun/net/ext/
DExtendedSocketOptions.java67 .collect(Collectors.toUnmodifiableSet()); in options0()
72 .collect(Collectors.toUnmodifiableSet()); in options0()
/libcore/ojluni/src/test/java/lang/String/
DStrip.java106 .collect(Collectors.toList())); in report()
111 .collect(Collectors.toList())); in report()
/libcore/luni/src/test/dex_src/libcore/java/lang/stackwalker/
DTest1.java33 return walker.walk(s -> s.collect(toList())); in invokeWalker()
/libcore/ojluni/src/test/java/math/BigInteger/
DPrimeTest.java107 .collect(toCollection(TreeSet::new)); in getPrimes()
153 .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/Optional/
DBasic.java230 assertEquals(Optional_stream(Optional.empty()).collect(toList()), List.of()); in testStreamEmpty()
237 assertEquals(Optional_stream(Optional.of("xyzzy")).collect(toList()), List.of("xyzzy")); in testStreamPresent()
283 assertEquals(s.collect(Collectors.toList()), List.of()); in testStream_empty()
291 assertEquals(s.collect(Collectors.toList()), List.of(3)); in testStream_present()
/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()

1234