Stream流 转换
Stream流
List -->map<String, String>
Map<String, String> map = list.stream().collect(Collectors.toMap(Person::getName, Person::getWork));
List -->map<String, T> 操作属性
Map<String, String> map = list.stream().collect(Collectors.
原创
2020-08-23 02:19:52 ·
300 阅读 ·
0 评论