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

Class ClassToListOfTrashMap

patterns/trash/ClassToListOfTrashMap.java:9–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7import java.util.*;
8
9public class ClassToListOfTrashMap {
10 public static void
11 show(Map<Class, List<Trash>> map) {
12 map.values().forEach( bin -> {
13 String typeName = "Trash";
14 if(!bin.isEmpty())
15 typeName =
16 bin.get(0).getClass().getSimpleName();
17 TrashValue.sum(bin, typeName);
18 });
19 }
20}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected