Package com.ibm.icu.text
Class PluralRules.Factory
java.lang.Object
com.ibm.icu.text.PluralRules.Factory
- 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 PluralRules
Deprecated.This API is ICU internal only.abstract PluralRules
forLocale
(ULocale locale, PluralRules.PluralType type) Deprecated.This API is ICU internal only.abstract ULocale[]
Deprecated.This API is ICU internal only.static com.ibm.icu.impl.PluralRulesLoader
Deprecated.This API is ICU internal only.abstract ULocale
getFunctionalEquivalent
(ULocale locale, boolean[] isAvailable) Deprecated.This API is ICU internal only.abstract boolean
hasOverride
(ULocale locale) Deprecated.This API is ICU internal only.
-
Constructor Details
-
Factory
Deprecated.This API is ICU internal only.Sole constructor
-
-
Method Details
-
forLocale
Deprecated.This API is ICU internal only.Provides access to the predefinedPluralRules
for 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 aPluralRules
object is returned.type
- The plural type (e.g., cardinal or ordinal).- Returns:
- The predefined
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.
-
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.
-