lambda表达式各种用法
根据姓名去除list中已包含的该姓名的数据
list = list.stream().filter(one-> !one.getUserInfo().contains(one.getName())).collect(Collectors.toList());
遍历map
map.forEach((k.v)->{
System.out.println("name:"+k+"value:"+v);
}
根据对象属性去重
userList.stream().collect(Collectors.collectingAndThen(
Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(UserParam::getOrgCode)))
talk is cheap. show me the code.