Collections.sort(List<T> Comparator) 自定义排序

Collections.sort(basicinfoList, new Comparator<MlisBasicinfo>() {
@Override
public int compare(MlisBasicinfo o1, MlisBasicinfo o2) {
return o1.getBasicinfoValue().compareTo(o2.getBasicinfoValue());
}
});

posted @ 2016-08-07 10:19  philonic  阅读(1451)  评论(0编辑  收藏  举报