class DictItem{
private String dataType;
private String dataCode;
private String dataValue;
}如何将List<DictItem>转化为Map<String,List<String,DictItem>>按照datatype,datacode 分组这种方式得到的是Map<String, Map<String, List<DictItem>>>
dictMaps = dictItems.stream().collect(Collectors.groupingBy(DictItem::getDataType, Collectors.groupingBy(DictItem::getDataCode)));
添加回答
举报
0/150
提交
取消