Class LocaleDisplayNames.LastResortLocaleDisplayNames

java.lang.Object
com.ibm.icu.text.LocaleDisplayNames
com.ibm.icu.text.LocaleDisplayNames.LastResortLocaleDisplayNames
Enclosing class:
LocaleDisplayNames

private static class LocaleDisplayNames.LastResortLocaleDisplayNames extends LocaleDisplayNames
Minimum implementation of LocaleDisplayNames
  • Field Details

  • Constructor Details

  • Method Details

    • getLocale

      public ULocale getLocale()
      Description copied from class: LocaleDisplayNames
      Returns the locale used to determine the display names. This is not necessarily the same locale passed to LocaleDisplayNames.getInstance(com.ibm.icu.util.ULocale).
      Specified by:
      getLocale in class LocaleDisplayNames
      Returns:
      the display locale
    • getDialectHandling

      public LocaleDisplayNames.DialectHandling getDialectHandling()
      Description copied from class: LocaleDisplayNames
      Returns the dialect handling used in the display names.
      Specified by:
      getDialectHandling in class LocaleDisplayNames
      Returns:
      the dialect handling enum
    • getContext

      public DisplayContext getContext(DisplayContext.Type type)
      Description copied from class: LocaleDisplayNames
      Returns the current value for a specified DisplayContext.Type.
      Specified by:
      getContext in class LocaleDisplayNames
      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: LocaleDisplayNames
      Returns 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:
      localeDisplayName in class LocaleDisplayNames
      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: LocaleDisplayNames
      Returns 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:
      localeDisplayName in class LocaleDisplayNames
      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: LocaleDisplayNames
      Returns 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:
      localeDisplayName in class LocaleDisplayNames
      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: LocaleDisplayNames
      Returns the display name of the provided language code.
      Specified by:
      languageDisplayName in class LocaleDisplayNames
      Parameters:
      lang - the language code
      Returns:
      the display name of the provided language code
    • scriptDisplayName

      public String scriptDisplayName(String script)
      Description copied from class: LocaleDisplayNames
      Returns the display name of the provided script code.
      Specified by:
      scriptDisplayName in class LocaleDisplayNames
      Parameters:
      script - the script code
      Returns:
      the display name of the provided script code
    • scriptDisplayName

      public String scriptDisplayName(int scriptCode)
      Description copied from class: LocaleDisplayNames
      Returns the display name of the provided script code. See UScript for recognized script codes.
      Specified by:
      scriptDisplayName in class LocaleDisplayNames
      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: LocaleDisplayNames
      Returns the display name of the provided region code.
      Specified by:
      regionDisplayName in class LocaleDisplayNames
      Parameters:
      region - the region code
      Returns:
      the display name of the provided region code
    • variantDisplayName

      public String variantDisplayName(String variant)
      Description copied from class: LocaleDisplayNames
      Returns the display name of the provided variant.
      Specified by:
      variantDisplayName in class LocaleDisplayNames
      Parameters:
      variant - the variant string
      Returns:
      the display name of the provided variant
    • keyDisplayName

      public String keyDisplayName(String key)
      Description copied from class: LocaleDisplayNames
      Returns the display name of the provided locale key.
      Specified by:
      keyDisplayName in class LocaleDisplayNames
      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: LocaleDisplayNames
      Returns the display name of the provided value (used with the provided key).
      Specified by:
      keyValueDisplayName in class LocaleDisplayNames
      Parameters:
      key - the locale key name
      value - 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: LocaleDisplayNames
      Return 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:
      getUiListCompareWholeItems in class LocaleDisplayNames
      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.