Package com.helger.commons.compare
Class CollatorHelper
- java.lang.Object
-
- com.helger.commons.compare.CollatorHelper
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static EChangeclearCache()Clear all cached collators.static CollatorgetCollatorSpaceBeforeDot(Locale aLocale)Create a collator that is based on the standard collator but sorts spaces before dots, because spaces are more important word separators than dots.
-
-
-
Method Detail
-
getCollatorSpaceBeforeDot
@Nonnull @ReturnsMutableCopy public static Collator getCollatorSpaceBeforeDot(@Nullable Locale aLocale)
Create a collator that is based on the standard collator but sorts spaces before dots, because spaces are more important word separators than dots. Another example is the correct sorting of things like "1.1 a" vs. "1.1.1 b" . This is the default collator used for sorting by default!- Parameters:
aLocale- The locale for which the collator is to be retrieved. May benullto indicate the usage of the default locale.- Returns:
- The created
RuleBasedCollatorand nevernull.
-
-