Collections.sort(list, new Comparator<BaseConStaticListBO>() {
@Override
public int compare(BaseConStaticListBO o1, BaseConStaticListBO o2) {
return Integer.parseInt(o1.getName().substring(0,1))-Integer.parseInt(o2.getName().substring(0,1));//从小到大
}
});
list集合排序大体格式
- 时间:
- 来源:互联网