mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-08 23:10:40 +00:00
ICU-7139 fix index constructor, etc.
X-SVN-Rev: 26617
This commit is contained in:
parent
1dc8949de0
commit
85f0ecb659
1 changed files with 10 additions and 2 deletions
|
@ -85,13 +85,21 @@ public class IndexCharacters {
|
|||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public IndexCharacters(ULocale locale) {
|
||||
this(locale, LocaleData.getExemplarSet(locale, LocaleData.ES_STANDARD), Collator.getInstance(locale));
|
||||
}
|
||||
|
||||
public IndexCharacters(ULocale locale, UnicodeSet exemplarSet, Collator collator) {
|
||||
this.locale = locale;
|
||||
comparator = Collator.getInstance(locale);
|
||||
try {
|
||||
comparator = (Collator) collator.clone();
|
||||
} catch (CloneNotSupportedException e) {
|
||||
throw new IllegalArgumentException(e);
|
||||
}
|
||||
comparator.setStrength(Collator.PRIMARY);
|
||||
|
||||
// get the exemplars, and handle special cases
|
||||
|
||||
UnicodeSet exemplars = LocaleData.getExemplarSet(locale, LocaleData.ES_STANDARD);
|
||||
UnicodeSet exemplars = (UnicodeSet) exemplarSet.cloneAsThawed();
|
||||
// question: should we add auxiliary exemplars?
|
||||
if (exemplars.containsSome(CORE_LATIN)) {
|
||||
exemplars.addAll(CORE_LATIN);
|
||||
|
|
Loading…
Add table
Reference in a new issue