删除map的key

删除map的key

private static void deleteKeyOfMap(Map paramsMap){
    System.out.println("=====删除前=====\n"+paramsMap);
    Iterator iter = paramsMap.keySet().iterator();
    while(iter.hasNext()){
        String key = iter.next();
        if(ID.equals(key)){
            iter.remove();
        }
    }
    System.out.println("=====删除后=====\n"+paramsMap);
}

你可能感兴趣的:(删除map的key)