日期:2014-05-20 浏览次数:20747 次
Set keys = map.keySet( ); if(keys != null) { Iterator iterator = keys.iterator( ); while(iterator.hasNext( )) { Object key = iterator.next( ); Object value = map.get(key); ;.... ;} }
Set entries = map.entrySet( ); if(entries != null) { Iterator iterator = entries.iterator( ); while(iterator.hasNext( )) { Map.Entry entry =iterator.next( ); Object key = entry.getKey( ); Object value = entry.getValue(); ;.... } }