/*
* 普通遍历
*/
public static void a(Map<String, String> filterSetMap){
if (filterSetMap != null && !filterSetMap.isEmpty()) {
Set<String> keySet = filterSetMap.keySet();
for (String key : keySet) {
String value = filterSetMap.get(key);
System.out.print("这是"+key+"我是"+value);
}
}
}
/*
* 快速的实现,推荐一下
*
*/
public static void b(Map<String, String> filterSetMap){
if (filterSetMap != null && !filterSetMap.isEmpty()) {
Set<Entry<String, String>> entrySet = filterSetMap.entrySet();
for(Entry<String, String> Entry:entrySet){
System.out.print("这是"+Entry.getKey()+"我是"+Entry.getValue());
}
}
}
* 普通遍历
*/
public static void a(Map<String, String> filterSetMap){
if (filterSetMap != null && !filterSetMap.isEmpty()) {
Set<String> keySet = filterSetMap.keySet();
for (String key : keySet) {
String value = filterSetMap.get(key);
System.out.print("这是"+key+"我是"+value);
}
}
}
/*
* 快速的实现,推荐一下
*
*/
public static void b(Map<String, String> filterSetMap){
if (filterSetMap != null && !filterSetMap.isEmpty()) {
Set<Entry<String, String>> entrySet = filterSetMap.entrySet();
for(Entry<String, String> Entry:entrySet){
System.out.print("这是"+Entry.getKey()+"我是"+Entry.getValue());
}
}
}