public static Map<String,Set<String>> cloneMap(Map<String,Set<String>> map){
  Map<String,Set<String>> clone=new HashMap<String,Set<String>>();
  for (  String key : map.keySet()) {
    Set<String> set=new HashSet<String>();
    Set<String> orig=(Set<String>)map.get(key);
    set.addAll(orig);
    clone.put(key,set);
  }
  return clone;
}

public static Map < String , Set < String > > cloneMap ( Map < String , Set < String > > map ) { Map < String , Set < String > > clone = new HashMap < String , Set < String > > ( ) ; for ( String key : map . keySet ( ) ) { Set < String > set = new HashSet < String > ( ) ; Set < String > orig = ( Set < String > ) map . get ( key ) ; set . addAll ( orig ) ; clone . put ( key , set ) ; } return clone ; }
returns a cloned map of string to set of string .
