I have a Map Map<Integer, List> with key, values. I need to convert this into List and pass it to the calling function. Once I have the list i need to convert this back to Map<Integer, List>
The reason I am converting the map to list is because i need to create webservice for this method. As I cannot expose the Map to webservice I need to convert this to list.
How to achieve this..?
From what i read you are trying to pass map via list (as your service limitation).
In case you don’t find any better solution, you can always use two lists. One for keys and one for values.
(but you are risking breaking map consistency with this approach).