I am trying to use a HashMap to map a unique string to a string ArrayList like this:
HashMap>
Basical
A solution is already selected. However, I post this solution for those who want to use an alternative approach:
// use LinkedHashMap if you want to read values from the hashmap in the same order as you put them into it
private ArrayList getMapValueAt(LinkedHashMap> hashMap, int index)
{
Map.Entry> entry = (Map.Entry>) hashMap.entrySet().toArray()[index];
return entry.getValue();
}