Package com.ibm.icu.text
Class TransliteratorRegistry.Spec
- java.lang.Object
-
- com.ibm.icu.text.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.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
isNextLocale
private boolean
isSpecLocale
private java.lang.String
nextSpec
private ICUResourceBundle
res
private java.lang.String
scriptName
private java.lang.String
spec
private java.lang.String
top
-
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()
-
-
-
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
-
res
private ICUResourceBundle res
-
-
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()
-
-