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());
}
}
原文地址:http://blog.51cto.com/12165865/2117868