public Collator getObject(CollatorProvider collatorProvider,
Locale locale,
String key,
Object params) {
assert params.length == 1;
Collator result = collatorProvider.getInstance(locale);
if (result != null) {
// put this Collator instance in the cache for two locales, one
// is for the desired locale, and the other is for the actual
// locale where the provider is found, which may be a fall back locale.
cache.put((Locale)params[0], result);
cache.put(locale, result);
return (Collator)result.clone();
}
return null;
}
|