Map<String, String> map = new IdentityHashMap<String,String>();
for(int i=0;i<3;i++){
map.put(new String("name"),"api"+i);
}
上面是我模拟的一个MAP,我需要遍历MAP获取key,然后通过获取到的key来判断value?
------解决方案--------------------
Map<String, String> configMap = new HashMap<String,String>();
Set<String> keySet = configMap.keySet();
for (Iterator<String> it = keySet.iterator(); it.hasNext();) {
String key = it.next();
String value = entityMap.get(key);
}