class Mycomparator implements Comparator{
public int compare(Object arg0, Object arg1) {
Step obj0=(Step)arg0;
Step obj1=(Step)arg1;
if(obj0.getId()<obj1.getId()){
return 0;
}else{
return 1;
}
}
}
Comparator comp = new Mycomparator();
Collections.sort(historyList,comp);
posted on 2006-12-18 20:58
有猫相伴的日子 阅读(351)
评论(0) 编辑 收藏 所属分类:
jdk