stream().collect

<p>For example, to compute the set of last names of people in each city:
* <pre>{@code
* Map<City, Set<String>> namesByCity
* = people.stream().collect(groupingBy(Person::getCity,
* mapping(Person::getLastName, toSet())));
* }</pre>



上一篇:六. “order by”是怎么工作的


下一篇:Qt5 程序启动画面动图效果