List> list = new ArrayList >(disMap.entrySet()); Collections.sort(list, new Comparator >() { @Override public int compare(Entry o1, Entry o2) { return o2.getValue().compareTo(o1.getValue()); } });
本文共 265 字,大约阅读时间需要 1 分钟。
List> list = new ArrayList >(disMap.entrySet()); Collections.sort(list, new Comparator >() { @Override public int compare(Entry o1, Entry o2) { return o2.getValue().compareTo(o1.getValue()); } });
转载地址:http://bbxsx.baihongyu.com/