// 将hashmap中value转到list中
public static List getList(HashMap hs) {
List list = new ArrayList();
Iterator itr = hs.keySet().iterator();
while (itr.hasNext()) {
list.add(hs.get(itr.next()));
}
return list;
}
//优化后的getList方法
public static List getList(HashMap hs) {
return new ArrayList(hs.values());
}