Map<String, String> listOfIndexes = INDEXED_TABLES.get(tableName);
Iterator it = listOfIndexes.entrySet().iterator();
while (it.hasNext()) {
Map.Entry pairs = (Map.Entry)it.next();
System.out.println(pairs.getKey());
}
我的哈希图是这样的:
public static Map<String, Map<String, String>> INDEXED_TABLES = new HashMap<String, Map<String, String>>()
{{
put("employee", EMPLOYEE);
}};
public static Map<String, String> EMPLOYEE = new HashMap<String, String>()
{{
put("name", "Test");
put("age", "Test");
put("sex", "test");
}};