public abstract class

PluralRules.Factory

extends java.lang.Object

 java.lang.Object

↳androidx.core.i18n.messageformat_icu.simple.PluralRules.Factory

Subclasses:

PluralRulesLoader

Overview

Provides a factory for returning plural rules icu_annot::internal CLDR This API is ICU internal only.

Summary

Constructors
publicFactory()

Methods
public final PluralRulesforLocale(java.util.Locale locale)

Utility for getting CARDINAL rules.

public abstract PluralRulesforLocale(java.util.Locale locale, PluralRules.PluralType type)

Provides access to the predefined PluralRules for a given locale and the plural type.

public static PluralRulesLoadergetDefaultFactory()

Returns the default factory.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Factory()

Methods

public abstract PluralRules forLocale(java.util.Locale locale, PluralRules.PluralType type)

Provides access to the predefined PluralRules 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 a PluralRules 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. icu_annot::internal CLDR This API is ICU internal only.

public final PluralRules forLocale(java.util.Locale locale)

Utility for getting CARDINAL rules.

Parameters:

locale: the locale

Returns:

plural rules. icu_annot::internal CLDR This API is ICU internal only.

public static PluralRulesLoader getDefaultFactory()

Returns the default factory. icu_annot::internal CLDR This API is ICU internal only.