1.// 排序 先新增一个Comparator
Comparator<DmoProcedureVO> comparator = new Comparator<DmoProcedureVO>() {
@Override
public int compare(DmoProcedureVO first, DmoProcedureVO second) {
UFDouble num1 = new UFDouble(first.getVprocedureno());
UFDouble num2 = new UFDouble(second.getVprocedureno());
return num1.compareTo(num2);
}
};
// 应用 Collections.sort 默认按照升序排序
for (Map.Entry<String, List<DmoProcedureVO>> entry : res.entrySet()) {
Collections.sort(entry.getValue(), comparator);
}
2.
Integer m ;
Integer n ;
m.compareTo(n) ;
返回结果等于0 ,m等于n ,当前值=参数;
返回结果大于0 ,m大于n,当前值>参数;
返回结果小于0,m小于n,当前值<参数.