public class PluralRulesLoader extends PluralRules.Factory
| Modifier and Type | Field and Description |
|---|---|
static PluralRulesLoader |
loader
The only instance of the loader.
|
| Modifier and Type | Method and Description |
|---|---|
PluralRules |
forLocale(ULocale locale,
PluralRules.PluralType type)
Returns the plural rules for the the locale.
|
ULocale[] |
getAvailableULocales()
Returns the locales for which we have plurals data.
|
ULocale |
getFunctionalEquivalent(ULocale locale,
boolean[] isAvailable)
Returns the functionally equivalent locale.
|
PluralRules |
getOrCreateRulesForLocale(ULocale locale,
PluralRules.PluralType type)
Gets the rule from the rulesId.
|
UResourceBundle |
getPluralBundle()
Return the plurals resource.
|
String |
getRulesIdForLocale(ULocale locale,
PluralRules.PluralType type)
Gets the rulesId from the locale,with locale fallback.
|
boolean |
hasOverride(ULocale locale)
Returns whether or not there are overrides.
|
public static final PluralRulesLoader loader
public ULocale[] getAvailableULocales()
getAvailableULocales in class PluralRules.Factorypublic ULocale getFunctionalEquivalent(ULocale locale, boolean[] isAvailable)
getFunctionalEquivalent in class PluralRules.Factorylocale - the locale to checkisAvailable - if not null and of length > 0, this will hold 'true' at index 0 if locale is directly defined
(without fallback) as having plural rulespublic String getRulesIdForLocale(ULocale locale, PluralRules.PluralType type)
public PluralRules getOrCreateRulesForLocale(ULocale locale, PluralRules.PluralType type)
public UResourceBundle getPluralBundle() throws MissingResourceException
MissingResourceExceptionpublic PluralRules forLocale(ULocale locale, PluralRules.PluralType type)
forLocale in class PluralRules.Factorylocale - The locale for which a PluralRules object is returned.type - The plural type (e.g., cardinal or ordinal).PluralRules object for this locale. If there's no predefined rules for
this locale, the rules for the closest parent in the locale hierarchy that has one will be returned.
The final fallback always returns the default rules.public boolean hasOverride(ULocale locale)
PluralRules.FactoryhasOverride in class PluralRules.Factory