public static String getAsciiSort(Map<String, Object> map) {
List<Entry<String, Object>> infoIds = new ArrayList<Entry<String, Object>>(map.entrySet());
// 对所有传入参数按照字段名的 ASCII 码从小到大排序(字典序)
Collections.sort(infoIds, new Comparator<Entry<String, Object>>() {
public int compare(Map.Entry<String, Object> o1, Map.Entry<String, Object> o2) {
return ((String) o1.getKey()).compareToIgnoreCase((String) o2.getKey());
}
});
}