Null项目参与排序

1.item1升序,item2升序,item3(存在NULL项目,NULL项目排在后面)升序
  Collections.sort(list, Comparator.comparing(Bean::getItem1)
                                   .thenComparing(Bean::getItem2)
                                   .thenComparing(Bean::getItem3, Comparator.nullsLast(Comparator.naturalOrder())));
原文地址:https://www.cnblogs.com/wzhw2015/p/12355049.html