public static final Collator getInstance(ULocale locale) {
        // fetching from service cache is faster than instantiation
        if (locale == null) {
            locale = ULocale.getDefault();
        }
        Collator coll = getShim().getInstance(locale);
        if (!locale.getName().equals(locale.getBaseName())) {  // any keywords?
            setAttributesFromKeywords(locale, coll,
                    (coll instanceof RuleBasedCollator) ? (RuleBasedCollator)coll : null);
        }
        return coll;
    }
public static final Collator getInstance ( ULocale locale ) { if ( locale == null ) { locale = ULocale . getDefault ( ) ; } Collator coll = getShim ( ) . getInstance ( locale ) ; if ( ! locale . getName ( ) . equals ( locale . getBaseName ( ) ) ) { setAttributesFromKeywords ( locale , coll , ( coll instanceof RuleBasedCollator ) ? ( RuleBasedCollator ) coll : null ) ; } return coll ; }
<strong>[icu]</strong> Returns the Collator for the desired locale.

<p>For some languages, multiple collation types are available;
for example, "de@collation=phonebook".
Starting with ICU 54, collation attributes can be specified via locale keywords as well,
in the old locale extension syntax ("el@colCaseFirst=upper")
or in language tag syntax ("el-u-kf-upper").
See <a href="http://userguide.icu-project.org/collation/api">User Guide: Collation API</a>.

@param locale the desired locale.
@return Collator for the desired locale if it is created successfully.
Otherwise if there is no Collator
associated with the current locale, the root collator will
be returned.
@see java.util.Locale
@see java.util.ResourceBundle
@see #getInstance(Locale)
@see #getInstance()