1.使用Entry
//HashMap<String, Object> map
for(Entry<String, Object> e : map.entrySet()){
//function code
}
2.使用Iterator
//HashMap<Map, Object> map
Iterator<Entry<String, Object>>myItera = map.entrySet().iterator();
while(myItera.hasNext()){
Entry<String, Object> e = myItera.next();
//function code
}