stream使用日记
List<XxxxxVo> xxxList = new ArrayList<>();
list->转map
Map<String, String> map = xxxList.stream().collect(Collectors.toMap(XxxxxVo::getId, XxxxxVo::getCode));
Map<String, XxxxxVo> map = xxxList.stream().collect(Collectors.toMap
原创
2020-12-16 11:24:54 ·
229 阅读 ·
0 评论