Class TransliteratorRegistry.Spec

  • Enclosing class:
    TransliteratorRegistry

    static class TransliteratorRegistry.Spec
    extends java.lang.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.
    • Constructor Summary

      Constructors 
      Constructor Description
      Spec​(java.lang.String theSpec)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String get()  
      java.util.ResourceBundle getBundle()
      Return the ResourceBundle for this spec, at the current level of iteration.
      java.lang.String getTop()  
      boolean hasFallback()  
      boolean isLocale()  
      java.lang.String next()  
      void reset()  
      private void setupNext()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • top

        private java.lang.String top
      • spec

        private java.lang.String spec
      • nextSpec

        private java.lang.String nextSpec
      • scriptName

        private java.lang.String scriptName
      • isSpecLocale

        private boolean isSpecLocale
      • isNextLocale

        private boolean isNextLocale
    • Constructor Detail

      • Spec

        public Spec​(java.lang.String theSpec)
    • Method Detail

      • hasFallback

        public boolean hasFallback()
      • reset

        public void reset()
      • setupNext

        private void setupNext()
      • next

        public java.lang.String next()
      • get

        public java.lang.String get()
      • isLocale

        public boolean isLocale()
      • getBundle

        public java.util.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 java.lang.String getTop()