Deprecated
as a consequence of PluralRules.Factory being deprecated. See corresponding docs for further information.
| Modifier and Type | Field and Description |
|---|---|
| public static final PluralRulesLoader | loader
The only instance of the loader. |
| private Map | |
| private Map | |
| private final Map | |
| private Map |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private void | checkBuildRulesIdMaps()
Lazily constructs the localeIdToRulesId and rulesIdToEquivalentULocale maps if necessary. |
| public PluralRules | forLocale(ULocale
The locale for which a locale, PluralRules.PluralRules object is returned.The plural type (e.g., cardinal or ordinal). typeImplements abstract com. |
| public ULocale[] | getAvailableULocales()
Implements abstract com. |
| public ULocale | getFunctionalEquivalent(ULocale
the locale to check locale, boolean[] if not null and of length > 0, this will hold 'true' at index 0 if locale is directly defined
(without fallback) as having plural rules isAvailable)Implements abstract com. |
| private Map | |
| public PluralRules | getOrCreateRulesForLocale(ULocale locale, PluralRules.
Gets the rule from the rulesId. |
| public UResourceBundle | |
| public String | getRulesIdForLocale(ULocale locale, PluralRules.
Gets the rulesId from the locale,with locale fallback. |
| private Map | |
| public boolean | hasOverride(ULocale locale)
Implements abstract com. |
| loader | back to summary |
|---|---|
| public static final PluralRulesLoader loader
Deprecated as a consequence of The only instance of the loader. | |
| localeIdToCardinalRulesId | back to summary |
|---|---|
| private Map<String, String> localeIdToCardinalRulesId | |
| localeIdToOrdinalRulesId | back to summary |
|---|---|
| private Map<String, String> localeIdToOrdinalRulesId | |
| pluralRulesCache | back to summary |
|---|---|
| private final Map<String, PluralRules> pluralRulesCache | |
| rulesIdToEquivalentULocale | back to summary |
|---|---|
| private Map<String, ULocale> rulesIdToEquivalentULocale | |
| PluralRulesLoader | back to summary |
|---|---|
| private PluralRulesLoader() Access through singleton. | |
| checkBuildRulesIdMaps | back to summary |
|---|---|
| private void checkBuildRulesIdMaps() Lazily constructs the localeIdToRulesId and rulesIdToEquivalentULocale maps if necessary. These exactly reflect the contents of the locales resource in plurals.res. | |
| forLocale | back to summary |
|---|---|
| public PluralRules forLocale(ULocale locale, PluralRules. Implements abstract com. Returns the plural rules for the the locale. If we don't have data, com.ibm.icu.text.PluralRules.DEFAULT is returned.
| |
| getAvailableULocales | back to summary |
|---|---|
| public ULocale[] getAvailableULocales() Implements abstract com. Returns the locales for which we have plurals data. Utility for testing. | |
| getFunctionalEquivalent | back to summary |
|---|---|
| public ULocale getFunctionalEquivalent(ULocale locale, boolean[] isAvailable) Implements abstract com. Returns the functionally equivalent locale.
| |
| getLocaleIdToRulesIdMap | back to summary |
|---|---|
| private Map Returns the lazily-constructed map. | |
| getOrCreateRulesForLocale | back to summary |
|---|---|
| public PluralRules getOrCreateRulesForLocale(ULocale locale, PluralRules. Gets the rule from the rulesId. If there is no rule for this rulesId, return null. | |
| getPluralBundle | back to summary |
|---|---|
| public UResourceBundle getPluralBundle() throws MissingResourceException Return the plurals resource. Note MissingResourceException is unchecked, listed here for clarity. Callers should handle this exception. | |
| getRulesIdForLocale | back to summary |
|---|---|
| public String getRulesIdForLocale(ULocale locale, PluralRules. Gets the rulesId from the locale,with locale fallback. If there is no rulesId, return null. The rulesId might be the empty string if the rule is the default rule. | |
| getRulesIdToEquivalentULocaleMap | back to summary |
|---|---|
| private Map Returns the lazily-constructed map. | |
| hasOverride | back to summary |
|---|---|
| public boolean hasOverride(ULocale locale) Implements abstract com. Doc from com. Returns whether or not there are overrides.
| |