I have a java question about a HashMap with an ArrayList in it. The key is a string, and the value is ArrayList ( HashMap<String, ArrayList<Object>>)
I am given a list of several keys, and I need to put the corresponding values in an ArrayList, and I'm not sure how to do this.
Here is an example:
(What is given to me)
ABC
ABC
ABC
123
123
Keys are actually file names, so the file is a value for ArrayList. Now I have to separate these file names in order to add files to the ArrayList. It makes sense?
This is the only code I have:
Set<String> tempModels = Utils.getSettingSet("module_names", new HashSet<String>(), getActivity());
for(String s : tempModels) {
Log.d("Loading from shared preferences: ", s);
String key = s.substring(0, 17);
}
source
share