【发布时间】:2013-04-28 21:23:01
【问题描述】:
我搜索了很多,但没有找到适合我的问题的解决方案。现在我想根据 int 值对ArrayList<Hashmap<String, Object>> 进行排序。
HashMap<String, Object>map = new HashMap<String, Object>();
map.put("friend", "x");
map.put("status", "yyoyo");
map.put("time", "20:10");
map.put("lat", 30.030535);
map.put("lng", 31.506050);
map.put("distance", 50);
statusMapList.add(map);
现在,这是一个示例。 statusMapList 拥有很多这样的 Hashmap,我想根据 distance 的值对它们进行排序,那么有什么办法吗?非常感谢。
【问题讨论】: