Package com.ibm.icu.impl
Enum StandardPlural
- All Implemented Interfaces:
Serializable
,Comparable<StandardPlural>
,java.lang.constant.Constable
Standard CLDR plural form/category constants.
See http://www.unicode.org/reports/tr35/tr35-numbers.html#Language_Plural_Rules
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Number of standard plural forms/categories.private final String
static final int
Numeric index of OTHER, same as OTHER.ordinal().static final List
<StandardPlural> Unmodifiable List of all standard plural form constants. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final StandardPlural
fromString
(CharSequence keyword) final String
static final int
indexFromString
(CharSequence keyword) static final int
indexOrNegativeFromString
(CharSequence keyword) static final int
indexOrOtherIndexFromString
(CharSequence keyword) static final StandardPlural
orNullFromString
(CharSequence keyword) static final StandardPlural
orOtherFromString
(CharSequence keyword) static StandardPlural
Returns the enum constant of this type with the specified name.static StandardPlural[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
ZERO
-
ONE
-
TWO
-
FEW
-
MANY
-
OTHER
-
EQ_0
-
EQ_1
-
-
Field Details
-
OTHER_INDEX
public static final int OTHER_INDEXNumeric index of OTHER, same as OTHER.ordinal(). -
VALUES
Unmodifiable List of all standard plural form constants. List version ofvalues()
. -
COUNT
public static final int COUNTNumber of standard plural forms/categories. -
keyword
-
-
Constructor Details
-
StandardPlural
-
-
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
-
getKeyword
- Returns:
- the lowercase CLDR keyword string for the plural form
-
orNullFromString
- Parameters:
keyword
- for example "few" or "other"- Returns:
- the plural form corresponding to the keyword, or null
-
orOtherFromString
- Parameters:
keyword
- for example "few" or "other"- Returns:
- the plural form corresponding to the keyword, or OTHER
-
fromString
- Parameters:
keyword
- for example "few" or "other"- Returns:
- the plural form corresponding to the keyword
- Throws:
IllegalArgumentException
- if the keyword is not a plural form
-
indexOrNegativeFromString
- Parameters:
keyword
- for example "few" or "other"- Returns:
- the index of the plural form corresponding to the keyword, or a negative value
-
indexOrOtherIndexFromString
- Parameters:
keyword
- for example "few" or "other"- Returns:
- the index of the plural form corresponding to the keyword, or OTHER_INDEX
-
indexFromString
- Parameters:
keyword
- for example "few" or "other"- Returns:
- the index of the plural form corresponding to the keyword
- Throws:
IllegalArgumentException
- if the keyword is not a plural form
-