Ashwini Swamy

Ashwini Swamy

  • NA
  • 1
  • 940

How to compare and sort map? I have list of maps both string

Jul 14 2014 11:55 PM
Here is my sample code,
 
List<Map<String, String>> mapItemsList = new ArrayList<Map<String, String>>();
 
mapItemsList.add( fillData("Mon Jul 14 11:57:58 IST 2014",
"workspace://SpacesStore/f52aeee1-df06-4129-abe8-d3caecdc59f4",
"delhi",
"agra",
"subject1",
"cosnentform"
));
mapItemsList.add( fillData("Fri Jul 11 11:47:05 IST 2014",
"workspace://SpacesStore/bb55d423-1d06-45d6-a223-3ea2a2521fa1",
"delhi",
"Chennai",
"Subject3",
"MedicalForm"
));
mapItemsList.add( fillData("Fri Jul 11 11:40:05 IST 2014",
"workspace://SpacesStore/f0abcf84-621c-41dc-9c13-92679e63ff2c",
"delhi",
"Bangalore",
"Subject3",
"MedicalForm"
));
 
Now i want to compare and sort the map each other.
Thanks for the help.