Package com.ibm.icu.impl
Class LocaleDisplayNamesImpl
- java.lang.Object
-
- com.ibm.icu.text.LocaleDisplayNames
-
- com.ibm.icu.impl.LocaleDisplayNamesImpl
-
public class LocaleDisplayNamesImpl extends LocaleDisplayNames
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLocaleDisplayNamesImpl.DataTablestatic classLocaleDisplayNamesImpl.DataTableType-
Nested classes/interfaces inherited from class com.ibm.icu.text.LocaleDisplayNames
LocaleDisplayNames.DialectHandling, LocaleDisplayNames.UiListItem
-
-
Constructor Summary
Constructors Constructor Description LocaleDisplayNamesImpl(ULocale locale, DisplayContext... contexts)LocaleDisplayNamesImpl(ULocale locale, LocaleDisplayNames.DialectHandling dialectHandling)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DisplayContextgetContext(DisplayContext.Type type)Returns the current value for a specified DisplayContext.Type.LocaleDisplayNames.DialectHandlinggetDialectHandling()Returns the dialect handling used in the display names.static LocaleDisplayNamesgetInstance(ULocale locale, DisplayContext... contexts)static LocaleDisplayNamesgetInstance(ULocale locale, LocaleDisplayNames.DialectHandling dialectHandling)ULocalegetLocale()Returns the locale used to determine the display names.List<LocaleDisplayNames.UiListItem>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 booleanhaveData(LocaleDisplayNamesImpl.DataTableType type)StringkeyDisplayName(String key)Returns the display name of the provided locale key.StringkeyValueDisplayName(String key, String value)Returns the display name of the provided value (used with the provided key).StringlanguageDisplayName(String lang)Returns the display name of the provided language code.StringlocaleDisplayName(ULocale locale)Returns the display name of the provided ulocale.StringlocaleDisplayName(String localeId)Returns the display name of the provided locale id.StringlocaleDisplayName(Locale locale)Returns the display name of the provided locale.StringregionDisplayName(String region)Returns the display name of the provided region code.StringscriptDisplayName(int scriptCode)Returns the display name of the provided script code.StringscriptDisplayName(String script)Returns the display name of the provided script code.StringscriptDisplayNameInContext(String script)Returns the display name of the provided script code when used in the context of a full locale name.StringvariantDisplayName(String variant)Returns the display name of the provided variant.-
Methods inherited from class com.ibm.icu.text.LocaleDisplayNames
getInstance, getInstance, getInstance, getUiList
-
-
-
-
Constructor Detail
-
LocaleDisplayNamesImpl
public LocaleDisplayNamesImpl(ULocale locale, LocaleDisplayNames.DialectHandling dialectHandling)
-
LocaleDisplayNamesImpl
public LocaleDisplayNamesImpl(ULocale locale, DisplayContext... contexts)
-
-
Method Detail
-
getInstance
public static LocaleDisplayNames getInstance(ULocale locale, LocaleDisplayNames.DialectHandling dialectHandling)
-
getInstance
public static LocaleDisplayNames getInstance(ULocale locale, DisplayContext... contexts)
-
getLocale
public ULocale getLocale()
Description copied from class:LocaleDisplayNamesReturns the locale used to determine the display names. This is not necessarily the same locale passed toLocaleDisplayNames.getInstance(com.ibm.icu.util.ULocale).- Specified by:
getLocalein classLocaleDisplayNames- Returns:
- the display locale
-
getDialectHandling
public LocaleDisplayNames.DialectHandling getDialectHandling()
Description copied from class:LocaleDisplayNamesReturns the dialect handling used in the display names.- Specified by:
getDialectHandlingin classLocaleDisplayNames- Returns:
- the dialect handling enum
-
getContext
public DisplayContext getContext(DisplayContext.Type type)
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
public String localeDisplayName(ULocale locale)
Description copied from class:LocaleDisplayNamesReturns the display name of the provided ulocale.- Specified by:
localeDisplayNamein classLocaleDisplayNames- Parameters:
locale- the locale whose display name to return- Returns:
- the display name of the provided locale
-
localeDisplayName
public String localeDisplayName(Locale locale)
Description copied from class:LocaleDisplayNamesReturns the display name of the provided locale.- Specified by:
localeDisplayNamein classLocaleDisplayNames- Parameters:
locale- the locale whose display name to return- Returns:
- the display name of the provided locale
-
localeDisplayName
public String localeDisplayName(String localeId)
Description copied from class:LocaleDisplayNamesReturns the display name of the provided locale id.- 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
public String languageDisplayName(String lang)
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
public String scriptDisplayName(String script)
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
public String scriptDisplayNameInContext(String script)
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
public String scriptDisplayName(int scriptCode)
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
public String regionDisplayName(String region)
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
public String variantDisplayName(String variant)
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
public String keyDisplayName(String key)
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
public String keyValueDisplayName(String key, String value)
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
public static boolean haveData(LocaleDisplayNamesImpl.DataTableType type)
-
-