Java 如何迭代HashMap<;字符串,ArrayList<;记录>&燃气轮机;在爪哇?
我想访问我在HashMap中创建的记录。Java 如何迭代HashMap<;字符串,ArrayList<;记录>&燃气轮机;在爪哇?,java,generics,collections,hashmap,Java,Generics,Collections,Hashmap,我想访问我在HashMap中创建的记录。 由于某些要求,我无法创建用于保存数据的新数据结构 private HashMap<String, ArrayList<Record>> customerInfoTable = new HashMap<String, ArrayList<Record>>(); private HashMap customerInfoTable=new HashMap(); getKeyList()获取键列表,然后为每个
由于某些要求,我无法创建用于保存数据的新数据结构
private HashMap<String, ArrayList<Record>> customerInfoTable = new
HashMap<String, ArrayList<Record>>();
private HashMap customerInfoTable=new
HashMap();
您尝试了什么?您遇到了什么问题?
for(List rs:customerInfoTable.values())for(Record r:rs){…}