声明:
排序类:HttpSendAndReviceVo 排序字段:order 排序list:httpList
步骤:
1 改对象类要实现Comparable接口
eq:public class HttpSendAndReviceVo implements Comparable<HttpSendAndReviceVo>
2要复写接口中的方法
public int compareTo(HttpSendAndReviceVo arg0) {
return this.getOrder().compareTo(arg0.getOrder());
}
3进行排序
Collections.sort(httpList);