Class PluralRules.Factory
java.lang.Object
org.graalvm.shadowed.com.ibm.icu.text.PluralRules.Factory
- Direct Known Subclasses:
PluralRulesLoader
- Enclosing class:
PluralRules
Deprecated.
This API is ICU internal only.
Provides a factory for returning plural rules
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal PluralRulesDeprecated.This API is ICU internal only.abstract PluralRulesforLocale(ULocale locale, PluralRules.PluralType type) Deprecated.This API is ICU internal only.abstract ULocale[]Deprecated.This API is ICU internal only.static PluralRulesLoaderDeprecated.This API is ICU internal only.abstract ULocalegetFunctionalEquivalent(ULocale locale, boolean[] isAvailable) Deprecated.This API is ICU internal only.abstract booleanhasOverride(ULocale locale) Deprecated.This API is ICU internal only.
-
Constructor Details
-
Factory
-
-
Method Details
-
forLocale
Deprecated.This API is ICU internal only.Provides access to the predefinedPluralRulesfor a given locale and the plural type.ICU defines plural rules for many locales based on CLDR Language Plural Rules. For these predefined rules, see CLDR page at https://unicode-org.github.io/cldr-staging/charts/latest/supplemental/language_plural_rules.html
- Parameters:
locale- The locale for which aPluralRulesobject is returned.type- The plural type (e.g., cardinal or ordinal).- Returns:
- The predefined
PluralRulesobject 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.
-
forLocale
Deprecated.This API is ICU internal only.Utility for getting CARDINAL rules.- Parameters:
locale- the locale- Returns:
- plural rules.
-
getAvailableULocales
Deprecated.This API is ICU internal only.Returns the locales for which there is plurals data. -
getFunctionalEquivalent
Deprecated.This API is ICU internal only.Returns the 'functionally equivalent' locale with respect to plural rules. Calling PluralRules.forLocale with the functionally equivalent locale, and with the provided locale, returns rules that behave the same.
All locales with the same functionally equivalent locale have plural rules that behave the same. This is not exhaustive; there may be other locales whose plural rules behave the same that do not have the same equivalent locale.- Parameters:
locale- 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 rules- Returns:
- the functionally-equivalent locale
-
getDefaultFactory
Deprecated.This API is ICU internal only.Returns the default factory. -
hasOverride
Deprecated.This API is ICU internal only.Returns whether or not there are overrides.
-