Collection.sort()

Collections.sort(rules, new Comparator<Rule>() {
    public int compare(Rule o1, Rule o2) {
        return o2.getSort() - o1.getSort();
    }
);
posted @ 2020-10-09 21:06  帖子搬运工  阅读(178)  评论(0编辑  收藏  举报