public static final class LocaleMatcher.Result extends Object
Modifier and Type | Method and Description |
---|---|
int |
getDesiredIndex()
Returns the index of the best-matching desired locale in the input Iterable order
|
Locale |
getDesiredLocale()
Returns the best-matching desired locale.
|
ULocale |
getDesiredULocale()
Returns the best-matching desired locale.
|
int |
getSupportedIndex()
Returns the index of the best-matching supported locale in the
constructor’s or builder’s input order (“set” Collection plus “added” locales).
|
Locale |
getSupportedLocale()
Returns the best-matching supported locale.
|
ULocale |
getSupportedULocale()
Returns the best-matching supported locale.
|
Locale |
makeResolvedLocale()
Takes the best-matching supported locale and adds relevant fields of the
best-matching desired locale, such as the -t- and -u- extensions.
|
ULocale |
makeResolvedULocale()
Takes the best-matching supported locale and adds relevant fields of the
best-matching desired locale, such as the -t- and -u- extensions.
|
public ULocale getDesiredULocale()
public Locale getDesiredLocale()
public ULocale getSupportedULocale()
LocaleMatcher.Builder.setNoDefaultLocale()
was called,
or if the list of supported locales is empty and no explicit default locale is set.public Locale getSupportedLocale()
LocaleMatcher.Builder.setNoDefaultLocale()
was called,
or if the list of supported locales is empty and no explicit default locale is set.public int getDesiredIndex()
public int getSupportedIndex()
public ULocale makeResolvedULocale()
Example: desired=ar-SA-u-nu-latn, supported=ar-EG, resolved locale=ar-SA-u-nu-latn
public Locale makeResolvedLocale()
Example: desired=ar-SA-u-nu-latn, supported=ar-EG, resolved locale=ar-SA-u-nu-latn
Copyright © 2016 Unicode, Inc. and others.