1.item1升序,item2升序,item3(存在NULL项目,NULL项目排在后面)升序
Collections.sort(list, Comparator.comparing(Bean::getItem1)
.thenComparing(Bean::getItem2)
.thenComparing(Bean::getItem3, Comparator.nullsLast(Comparator.naturalOrder())));
.thenComparing(Bean::getItem2)
.thenComparing(Bean::getItem3, Comparator.nullsLast(Comparator.naturalOrder())));