/** * Get a Locale dependent collator * * @return The collator to use */ private static RuleBasedCollator getCollator() { // Get the Locale to use Locale locale = getSortLocale(); if (locale != null) { // Get collator for the supplied Locale RuleBasedCollator collator = (RuleBasedCollator) Collator.getInstance(locale); if (collator != null) { return collator; } } return null; }