Class of android.icu.text · PluralRules.java · Android's reference
public class PluralRules implements java.io.Serializable
A language's plural categories for a number (cardinals), as ICU selects them: the rules of Unicode CLDR, which Android 16's ICU and the JDK both carry. A rule is relations joined by "and", then "or"; a relation is an operand of the number, maybe modulo a value, that is (=) or is not (!=) one of a list of values and ranges (of integers only).
public static final String KEYWORD_ZERO = "zero" sourcepublic static final String KEYWORD_ONE = "one" sourcepublic static final String KEYWORD_TWO = "two" sourcepublic static final String KEYWORD_FEW = "few" sourcepublic static final String KEYWORD_MANY = "many" sourcepublic static final String KEYWORD_OTHER = "other" sourcepublic static final PluralRules DEFAULT sourceOther for every number, the rules of a language with no categories
public static PluralRules forLocale(Locale locale) sourceThe rules of a locale's language, or of its region where CLDR gives that one rules of its own
public static PluralRules forLocale(ULocale locale) sourcepublic String select(double number) sourceThe category of a number: the first whose rule it meets, else other
public Set<String> getKeywords() sourcepublic String toString() sourcepublic boolean equals(Object o) sourcepublic int hashCode() sourceMade from ScarletNX's Sail at 166ad3910f80. The framework is ScarletNX's (GPL-3.0-or-later); the parts that follow the Android Open Source Project's sources (Apache-2.0) say so in their files.