这里面是我:添加到一个HashMap一个HashMap
HashMap<String,HashMap<Integer,Integer>> data =
new HashMap<String,HashMap<Integer,Integer>>();
但我无法增加值这一点,因为内部HashMap中没有一个名称(注意:它不是”应该是)。实际上,我想一个数组列表,添加到HashMap中的第一个整数所以我想是这样的:
data.put(var, data.get(array.get(x), y));
它非常不喜欢和我完全无能,如何做到这一点。
是什么array.get(x)和y的值? – 2013-03-24 17:53:41
我建议你看看番石榴图书馆Mulitmap。 https://code.google.com/p/guava-libraries/wiki/NewCollectionTypesExplained#Multimap – evgenyl 2013-03-24 17:56:23