Package com.ibm.icu.impl
Class LocaleDisplayNamesImpl
java.lang.Object
com.ibm.icu.text.LocaleDisplayNames
com.ibm.icu.impl.LocaleDisplayNamesImpl
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classprivate final classprivate static enumCapitalization context usage types for locale display namesstatic class(package private) static classstatic enum(package private) static class(package private) static class(package private) static class(package private) static classNested classes/interfaces inherited from class com.ibm.icu.text.LocaleDisplayNames
LocaleDisplayNames.DialectHandling, LocaleDisplayNames.UiListItem -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final LocaleDisplayNamesImpl.Cacheprivate final DisplayContextprivate BreakIteratorBreakIterator to use for capitalizationprivate boolean[]Capitalization transforms.private static final Map<String, LocaleDisplayNamesImpl.CapitalizationContextUsage> Map from resource key to CapitalizationContextUsage valueprivate final CurrencyData.CurrencyDisplayInfoprivate final LocaleDisplayNames.DialectHandlingprivate final Stringprivate final charprivate final charprivate final charprivate final charprivate final Stringprivate final LocaleDisplayNamesImpl.DataTableprivate final ULocaleprivate final DisplayContextprivate final LocaleDisplayNamesImpl.DataTableprivate final Stringprivate final DisplayContextprivate static final CaseMap.Title -
Constructor Summary
ConstructorsConstructorDescriptionLocaleDisplayNamesImpl(ULocale locale, DisplayContext... contexts) LocaleDisplayNamesImpl(ULocale locale, LocaleDisplayNames.DialectHandling dialectHandling) -
Method Summary
Modifier and TypeMethodDescriptionprivate Stringprivate StringBuilderappendWithSep(String s, StringBuilder b) Returns 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.private StringkeyDisplayName(String key, boolean skipAdjust) keyValueDisplayName(String key, String value) Returns the display name of the provided value (used with the provided key).private StringkeyValueDisplayName(String key, String value, boolean skipAdjust) languageDisplayName(String lang) Returns the display name of the provided language code.localeDisplayName(ULocale locale) Returns the display name of the provided ulocale.localeDisplayName(String localeId) Returns the display name of the provided locale id.localeDisplayName(Locale locale) Returns the display name of the provided locale.private StringlocaleDisplayNameInternal(ULocale locale) private StringlocaleIdName(String localeId) private LocaleDisplayNames.UiListItemnewRow(ULocale modified, DisplayContext capContext) regionDisplayName(String region) Returns the display name of the provided region code.private StringregionDisplayName(String region, boolean skipAdjust) 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.private StringscriptDisplayNameInContext(String script, boolean skipAdjust) private static StringtoTitleWholeStringNoLowercase(ULocale locale, String s) variantDisplayName(String variant) Returns the display name of the provided variant.private StringvariantDisplayName(String variant, boolean skipAdjust) Methods inherited from class com.ibm.icu.text.LocaleDisplayNames
getInstance, getInstance, getInstance, getUiList
-
Field Details
-
locale
-
dialectHandling
-
capitalization
-
nameLength
-
substituteHandling
-
langData
-
regionData
-
separatorFormat
-
format
-
keyTypeFormat
-
formatOpenParen
private final char formatOpenParen -
formatReplaceOpenParen
private final char formatReplaceOpenParen -
formatCloseParen
private final char formatCloseParen -
formatReplaceCloseParen
private final char formatReplaceCloseParen -
currencyDisplayInfo
-
cache
-
capitalizationUsage
private boolean[] capitalizationUsageCapitalization transforms. For each usage type, indicates whether to titlecase for the context specified in capitalization (which we know at construction time). -
contextUsageTypeMap
private static final Map<String,LocaleDisplayNamesImpl.CapitalizationContextUsage> contextUsageTypeMapMap from resource key to CapitalizationContextUsage value -
capitalizationBrkIter
BreakIterator to use for capitalization -
TO_TITLE_WHOLE_STRING_NO_LOWERCASE
-
-
Constructor Details
-
LocaleDisplayNamesImpl
-
LocaleDisplayNamesImpl
-
-
Method Details
-
toTitleWholeStringNoLowercase
-
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(com.ibm.icu.util.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
-
adjustForUsageAndContext
private String adjustForUsageAndContext(LocaleDisplayNamesImpl.CapitalizationContextUsage usage, String name) -
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
-
localeDisplayNameInternal
-
localeIdName
-
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
-
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
-
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
-
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
-
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
-
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.
-
newRow
-
haveData
-
appendWithSep
-