for(Object[] objects : list){
map.put(objects[0].toString(), null);
}
for(Map.Entry<String, List<String>> entry:map.entrySet()){
entry.setValue(new ArrayList<String>());
}
for(Object[] objects : list){
String value = objects[1].toString();
if(value != null ){
map.get(objects[0].toString()).add(objects[1].toString());
}
}
JAVA将快速将列表分组并排序键
猜你喜欢
转载自blog.51cto.com/12165865/2117868
今日推荐
周排行