Modifying the returned Map value type with collectors.groupingBy in Java stream - Stack Overflow
use the mapping
collector:
.collect(Collectors.groupingBy(ek -> ek.getKey().toLowerCase(), Collectors.mapping(Entry::getValue, Collector.toSet())));
Read full article from Modifying the returned Map value type with collectors.groupingBy in Java stream - Stack Overflow
No comments:
Post a Comment