list object 排序问题

来源:互联网 发布:1-10抽奖概率算法 编辑:程序博客网 时间:2024/06/05 01:10
  Collections.sort(list, new Comparator() {            public int compare(Object a, Object b) {                int one = ((Bean) a).getPriority();                int two = ((Bean) b).getPriority();                return one - two;            }        });
原创粉丝点击