Class LocaleDisplayNamesImpl
java.lang.Object
org.graalvm.shadowed.com.ibm.icu.text.LocaleDisplayNames
org.graalvm.shadowed.com.ibm.icu.impl.LocaleDisplayNamesImpl
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumNested classes/interfaces inherited from class LocaleDisplayNames
LocaleDisplayNames.DialectHandling, LocaleDisplayNames.UiListItem -
Constructor Summary
ConstructorsConstructorDescriptionLocaleDisplayNamesImpl(ULocale locale, DisplayContext... contexts) LocaleDisplayNamesImpl(ULocale locale, LocaleDisplayNames.DialectHandling dialectHandling) -
Method Summary
Modifier and TypeMethodDescriptionReturns the current value for a specified DisplayContext.Type.Returns the dialect handling used in the display names.static LocaleDisplayNamesgetInstance(ULocale locale, DisplayContext... contexts) static LocaleDisplayNamesgetInstance(ULocale locale, LocaleDisplayNames.DialectHandling dialectHandling) Returns the locale used to determine the display names.getUiListCompareWholeItems(Set<ULocale> localeSet, Comparator<LocaleDisplayNames.UiListItem> comparator) Return a list of information used to construct a UI list of locale names, providing more access to control the sorting.static booleankeyDisplayName(String key) Returns the display name of the provided locale key.keyValueDisplayName(String key, String value) Returns the display name of the provided value (used with the provided key).languageDisplayName(String lang) Returns the display name of the provided language code.localeDisplayName(String localeId) Returns the display name of the provided locale id.localeDisplayName(Locale locale) Returns the display name of the provided locale.localeDisplayName(ULocale locale) Returns the display name of the provided ulocale.regionDisplayName(String region) Returns the display name of the provided region code.scriptDisplayName(int scriptCode) Returns the display name of the provided script code.scriptDisplayName(String script) Returns the display name of the provided script code.scriptDisplayNameInContext(String script) Returns the display name of the provided script code when used in the context of a full locale name.variantDisplayName(String variant) Returns the display name of the provided variant.Methods inherited from class LocaleDisplayNames
getInstance, getInstance, getInstance, getUiList
-
Constructor Details
-
LocaleDisplayNamesImpl
-
LocaleDisplayNamesImpl
-
-
Method Details
-
getInstance
public static LocaleDisplayNames getInstance(ULocale locale, LocaleDisplayNames.DialectHandling dialectHandling) -
getInstance
-
getLocale
Description copied from class:LocaleDisplayNamesReturns the locale used to determine the display names. This is not necessarily the same locale passed toLocaleDisplayNames.getInstance(ULocale).- Specified by:
getLocalein classLocaleDisplayNames- Returns:
- the display locale
-
getDialectHandling
Description copied from class:LocaleDisplayNamesReturns the dialect handling used in the display names.- Specified by:
getDialectHandlingin classLocaleDisplayNames- Returns:
- the dialect handling enum
-
getContext
Description copied from class:LocaleDisplayNamesReturns the current value for a specified DisplayContext.Type.- Specified by:
getContextin classLocaleDisplayNames- Parameters:
type- the DisplayContext.Type whose value to return- Returns:
- the current DisplayContext setting for the specified type
-
localeDisplayName
Description copied from class:LocaleDisplayNamesReturns the display name of the provided ulocale. When no display names are available for all or portions of the original locale ID, those portions may be used directly (possibly in a more canonical form) as part of the returned display name.- Specified by:
localeDisplayNamein classLocaleDisplayNames- Parameters:
locale- the locale whose display name to return- Returns:
- the display name of the provided locale
-
localeDisplayName
Description copied from class:LocaleDisplayNamesReturns the display name of the provided locale. When no display names are available for all or portions of the original locale ID, those portions may be used directly (possibly in a more canonical form) as part of the returned display name.- Specified by:
localeDisplayNamein classLocaleDisplayNames- Parameters:
locale- the locale whose display name to return- Returns:
- the display name of the provided locale
-
localeDisplayName
Description copied from class:LocaleDisplayNamesReturns the display name of the provided locale id. When no display names are available for all or portions of the original locale ID, those portions may be used directly (possibly in a more canonical form) as part of the returned display name.- Specified by:
localeDisplayNamein classLocaleDisplayNames- Parameters:
localeId- the id of the locale whose display name to return- Returns:
- the display name of the provided locale
-
languageDisplayName
Description copied from class:LocaleDisplayNamesReturns the display name of the provided language code.- Specified by:
languageDisplayNamein classLocaleDisplayNames- Parameters:
lang- the language code- Returns:
- the display name of the provided language code
-
scriptDisplayName
Description copied from class:LocaleDisplayNamesReturns the display name of the provided script code.- Specified by:
scriptDisplayNamein classLocaleDisplayNames- Parameters:
script- the script code- Returns:
- the display name of the provided script code
-
scriptDisplayNameInContext
Description copied from class:LocaleDisplayNamesReturns the display name of the provided script code when used in the context of a full locale name.- Overrides:
scriptDisplayNameInContextin classLocaleDisplayNames- Parameters:
script- the script code- Returns:
- the display name of the provided script code
-
scriptDisplayName
Description copied from class:LocaleDisplayNamesReturns the display name of the provided script code. SeeUScriptfor recognized script codes.- Specified by:
scriptDisplayNamein classLocaleDisplayNames- Parameters:
scriptCode- the script code number- Returns:
- the display name of the provided script code
-
regionDisplayName
Description copied from class:LocaleDisplayNamesReturns the display name of the provided region code.- Specified by:
regionDisplayNamein classLocaleDisplayNames- Parameters:
region- the region code- Returns:
- the display name of the provided region code
-
variantDisplayName
Description copied from class:LocaleDisplayNamesReturns the display name of the provided variant.- Specified by:
variantDisplayNamein classLocaleDisplayNames- Parameters:
variant- the variant string- Returns:
- the display name of the provided variant
-
keyDisplayName
Description copied from class:LocaleDisplayNamesReturns the display name of the provided locale key.- Specified by:
keyDisplayNamein classLocaleDisplayNames- Parameters:
key- the locale key name- Returns:
- the display name of the provided locale key
-
keyValueDisplayName
Description copied from class:LocaleDisplayNamesReturns the display name of the provided value (used with the provided key).- Specified by:
keyValueDisplayNamein classLocaleDisplayNames- Parameters:
key- the locale key namevalue- the locale key's value- Returns:
- the display name of the provided value
-
getUiListCompareWholeItems
public List<LocaleDisplayNames.UiListItem> getUiListCompareWholeItems(Set<ULocale> localeSet, Comparator<LocaleDisplayNames.UiListItem> comparator) Description copied from class:LocaleDisplayNamesReturn a list of information used to construct a UI list of locale names, providing more access to control the sorting. Normally use getUiList instead.- Specified by:
getUiListCompareWholeItemsin classLocaleDisplayNames- Parameters:
localeSet- a list of locales to present in a UI list. The casing uses the settings in the LocaleDisplayNames instance.comparator- how to sort the UiListItems in the result.- Returns:
- an ordered list of UiListItems.
-
haveData
-