Enum DisplayOptions.PluralCategory
- All Implemented Interfaces:
Serializable, Comparable<DisplayOptions.PluralCategory>
- Enclosing class:
DisplayOptions
Standard CLDR plural category constants. See
http://www.unicode.org/reports/tr35/tr35-numbers.html#Language_Plural_Rules
- Status:
- Stable ICU 72.
-
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final List<DisplayOptions.PluralCategory> Unmodifiable List of all plural categories constants. -
Method Summary
Modifier and TypeMethodDescriptionstatic final DisplayOptions.PluralCategoryfromIdentifier(String identifier) final StringReturns the enum constant of this type with the specified name.static DisplayOptions.PluralCategory[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
UNDEFINED
A possible setting for PluralCategory. The plural category context to be used is unknown (this is the default value).- Status:
- Stable ICU 72.
-
ZERO
- Status:
- Stable ICU 72.
-
ONE
- Status:
- Stable ICU 72.
-
TWO
- Status:
- Stable ICU 72.
-
FEW
- Status:
- Stable ICU 72.
-
MANY
- Status:
- Stable ICU 72.
-
OTHER
- Status:
- Stable ICU 72.
-
-
Field Details
-
VALUES
Unmodifiable List of all plural categories constants. List version ofvalues().- Status:
- Stable ICU 72.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getIdentifier
- Returns:
- the lowercase CLDR keyword string for the plural category
- Status:
- Stable ICU 72.
-
fromIdentifier
- Parameters:
identifier- in lower case such as "few" or "other"- Returns:
- the plural category corresponding to the identifier, or
UNDEFINED - Status:
- Stable ICU 72.
-