Class TransliteratorRegistry.Spec

java.lang.Object
com.ibm.icu.text.TransliteratorRegistry.Spec
Enclosing class:
TransliteratorRegistry

static class TransliteratorRegistry.Spec extends Object
A Spec is a string specifying either a source or a target. In more general terms, it may also specify a variant, but we only use the Spec class for sources and targets. A Spec may be a locale or a script. If it is a locale, it has a fallback chain that goes xx_YY_ZZZ -> xx_YY -> xx -> ssss, where ssss is the script mapping of xx_YY_ZZZ. The Spec API methods hasFallback(), next(), and reset() iterate over this fallback sequence. The Spec class canonicalizes itself, so the locale is put into canonical form, or the script is transformed from an abbreviation to a full name.
  • Field Details

    • top

      private String top
    • spec

      private String spec
    • nextSpec

      private String nextSpec
    • scriptName

      private String scriptName
    • isSpecLocale

      private boolean isSpecLocale
    • isNextLocale

      private boolean isNextLocale
    • res

      private ICUResourceBundle res
  • Constructor Details

    • Spec

      public Spec(String theSpec)
  • Method Details

    • hasFallback

      public boolean hasFallback()
    • reset

      public void reset()
    • setupNext

      private void setupNext()
    • next

      public String next()
    • get

      public String get()
    • isLocale

      public boolean isLocale()
    • getBundle

      public ResourceBundle getBundle()
      Return the ResourceBundle for this spec, at the current level of iteration. The level of iteration goes from aa_BB_CCC to aa_BB to aa. If the bundle does not correspond to the current level of iteration, return null. If isLocale() is false, always return null.
    • getTop

      public String getTop()