I am using this code to convert a Set to a List:
Set
List
Map> mainMap = new HashMap<>(); for (int i
I would do :
Map mainMap = new HashMap(); for(int i=0; i