- Set<Integer> keyset=map.keySet();
- Iterator<Integer> iter=keyset.iterator();
- for(;iter.hasNext();)
- {
- Integer in=iter.next();
- System.out.print(in+"{");
- Map<Integer, List<String>> subMap=map.get(in);
- Set<Integer> set=subMap.keySet();
- Iterator<Integer> iter1=set.iterator();
- while(iter1.hasNext())
- {
- Integer in2=iter1.next();
- System.out.print(in2+"= ");
- List<String> list = subMap.get(in2);
- for(int i=0;i<list.size();i++)
- {
- System.out.print("{"+list.get(i)+"}");
- }
- }
- System.out.println("}");
- }
复制代码 |