搜索地图忽略大小写
//from n o w j a v a . c o m //package com.nowjava; import java.util.Iterator; import java.util.Map; public class Main { public static String searchMapIgnoreCase(Map hm, String searchFor) { Iterator i = hm.entrySet().iterator(); String newName = null; while (i.hasNext()) { Map.Entry entry = (Map.Entry) i.next(); String key = (String) entry.getKey(); String value = (String) entry.getValue(); /* from n o w j a v a . c o m*/ if (key.equalsIgnoreCase(searchFor)) newName = value;