public static final Map<String,List<String>> normalized(Map<String,List<String>> map,String pgName,String pKey){ List<String> list = new ArrayList<String>(); if(map.isEmpty()){ list.add(pKey); map.put(pgName, list); }else{ if(map.containsKey(pgName)){ map.get(pgName).add(pKey); }else{ list.add(pKey); map.put(pgName, list); } } return map; }