Home
last modified time | relevance | path

Searched refs:classifier (Results 1 – 2 of 2) sorted by relevance

/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/
DTabulatorsTest.java84 private final Function<T, K> classifier; field in TabulatorsTest.GroupedMapAssertion
87 protected GroupedMapAssertion(Function<T, K> classifier, in GroupedMapAssertion() argument
91 this.classifier = classifier; in GroupedMapAssertion()
100 assertContentsUnordered(map.keySet(), source.get().map(classifier).collect(toSet())); in assertValue()
104 … () -> source.get().filter(e -> classifier.apply(e).equals(key)), in assertValue()
448 Function<Integer, Integer> classifier = i -> i % 3;
451 exerciseMapTabulation(data, groupingBy(classifier),
452 new GroupedMapAssertion<>(classifier, HashMap.class,
454 exerciseMapTabulation(data, groupingByConcurrent(classifier),
455 new GroupedMapAssertion<>(classifier, ConcurrentHashMap.class,
[all …]
/libcore/ojluni/src/main/java/java/util/stream/
DCollectors.java804 groupingBy(Function<? super T, ? extends K> classifier) {
805 return groupingBy(classifier, toList());
851 Collector<T, ?, Map<K, D>> groupingBy(Function<? super T, ? extends K> classifier,
853 return groupingBy(classifier, HashMap::new, downstream);
901 Collector<T, ?, M> groupingBy(Function<? super T, ? extends K> classifier,
907 … K key = Objects.requireNonNull(classifier.apply(t), "element cannot be mapped to a null key");
966 groupingByConcurrent(Function<? super T, ? extends K> classifier) {
967 return groupingByConcurrent(classifier, ConcurrentHashMap::new, toList());
1006 …lector<T, ?, ConcurrentMap<K, D>> groupingByConcurrent(Function<? super T, ? extends K> classifier,
1008 return groupingByConcurrent(classifier, ConcurrentHashMap::new, downstream);
[all …]