MCPcopy Index your code
hub / github.com/BruceEckel/OnJava8-Examples / main

Method main

patterns/trash/GroupingBy.java:11–18  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

9
10public class GroupingBy {
11 public static void main(String[] args) {
12 List<Trash> bin = new ArrayList<>();
13 ParseTrash.fillBin("trash", bin);
14 Map<Class, List<Trash>> m =
15 bin.stream().collect(
16 Collectors.groupingBy(Object::getClass));
17 ClassToListOfTrashMap.show(m);
18 }
19}
20/* Output:
21Loading patterns.trash.Cardboard

Callers

nothing calls this directly

Calls 3

fillBinMethod · 0.95
showMethod · 0.95
streamMethod · 0.45

Tested by

no test coverage detected