java实现:根据 map的value值获取key值
/** * 根据 map的value值获取key值 * @param map * @param value * @return */ public static String getKeyFromValue(Map<String, String> map, String value) { String mKey = ""; Set<String> keySet = map.keySet(); for (String key : keySet) { if ( value.equals(map.get(key)) ) { mKey = key; } } return mKey; }