我有代码:
List<ModelMap> nameCustomer = new ArrayList<ModelMap>();
for (int i=1;i<150;i++) {
ModelMap map = new ModelMap();
map.put("name", "nazwa " + i);
map.put("surname", "nazwisko " + i);
map.put("number", "123 ");
nameCustomer.add(map);
}
ModelMap[] result = new ModelMap[nameCustomer.size()];
ModelMap[] rowsArray = nameCustomer.toArray(result);
如何按姓氏或数字对 nameCustomer(或 rowsArray)进行排序?