如何重新排列HashMap?我想知道是否可以按日期订购。
ArrayList<HashMap<String, String>> newsliste;
HashMap<String, String> map = new HashMap<String, String>();
map.put("date", "01-10-2001");
map.put("name", "yoan");
newsliste.add(map);
HashMap<String, String> map1 = new HashMap<String, String>();
map.put("date", "11-5-2001");
map.put("name", "Rom");
newsliste.add(map1);
HashMap<String, String> map2 = new HashMap<String, String>();
map.put("date", "01-05-2003");
map.put("name", "Nico");
newsliste.add(map2);
HashMap<String, String> map3 = new HashMap<String, String>();
map.put("date", "13-10-2001");
map.put("name", "moup");
newsliste.add(map3);