stream取得List中不重复的项目的List<String>

List<String> itemList = list.stream().collect(Collectors.groupingBy(Bean::getItem)).keySet().stream().map(key -> key).collect(Collectors.toList());

猜你喜欢

转载自www.cnblogs.com/wzhw2015/p/12381628.html
今日推荐