I have a method from decompiled code that i am trying to run and understand.
The 5 line does not compile and i get an error saying
incompatible types required: java util.Hashmap found: java.lang.String.
private void resetFieldModel(HashMap<String, Integer> to_use_map)
{
this.current_field_model.removeAllElements();
Set temp_set = to_use_map.keySet();
for (String s : temp_set)
{
this.current_field_model.addElement(s);
}
}
You must iterate through the
temp_setwhich must ofSet<String>type(in your code). The idea is that each element intemp_setis of typeString