map values as list java 8 code example
Example 1: java map values to list
List<Value> list = new ArrayList<Value>(map.values());
Example 2: list to map of list java 8
Map<String,Set<String>> map = list.stream().
collect(Collectors.groupingBy(
Student::getName,
Collectors.mapping(e->getNum(e.getAddr()), Collectors.toSet())
));
System.out.println("Map : "+map);