📜  java stream sort Collator - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:08.038000             🧑  作者: Mango

代码示例1
Collator coll = Collator.getInstance(new Locale("tr","TR"));
coll.setStrength(Collator.PRIMARY);
List sorted = names.stream()
                           .sorted(Comparator.comparing(AClass::getName,coll))
                           .collect(Collectors.toList());