List lambda 排序

Comparator<PromotionRule> comparator = Comparator.comparing(PromotionRule::getCreatedTime);
promotionRuleList.sort(comparator.reversed());

 

posted @ 2018-05-18 17:21  梦见舟  阅读(149)  评论(0编辑  收藏  举报