Java 8 lamda 表达式
2018-05-22 本文已影响19人
JoneSnow
List<String> noteIdList = list.stream().map(Note::getId).collect(Collectors.toList());
Set<String> userIdSet = noteMap.values().stream().map(Note::getUser_id).collect(Collectors.toSet());
List<String> noteIdList = list.stream().map(Note::getId).collect(Collectors.toList());
Set<String> userIdSet = noteMap.values().stream().map(Note::getUser_id).collect(Collectors.toSet());