Check out example codes for "java stream sort Collator". It will help you in understanding the concepts better.

Code Example 1

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

Learn ReactJs, React Native from akashmittal.com