List stream achieved Map not duplicate items <String>

List<String> itemList = itemMap.entrySet().stream()

.collect(Collectors.groupingBy(e -> e.getKey().substring(11)))
.keySet()
.stream()
.map(key -> key)
.collect(Collectors.toList());

Note e.getKey (). Substring (11) is a key part of a combination of values taken items

Guess you like

Origin www.cnblogs.com/wzhw2015/p/12381742.html