public List<String> getValueList(HashMap<String,String> map){ ArrayList<String> valueList =new ArrayList<>(); Collection<String> values = map.values(); for(String value : values){ valueList.add(value); } return valueList; }
标签:map,HashMap,list,value,values,valueList,泛型 From: https://www.cnblogs.com/rpbszy/p/17105120.html