Package com.ibm.icu.text
Enum DisplayOptions.PluralCategory
- java.lang.Object
-
- java.lang.Enum<DisplayOptions.PluralCategory>
-
- com.ibm.icu.text.DisplayOptions.PluralCategory
-
- All Implemented Interfaces:
Serializable
,Comparable<DisplayOptions.PluralCategory>
- Enclosing class:
- DisplayOptions
public static enum DisplayOptions.PluralCategory extends Enum<DisplayOptions.PluralCategory>
Standard CLDR plural category constants. See http://www.unicode.org/reports/tr35/tr35-numbers.html#Language_Plural_Rules- Status:
- Stable ICU 72.
-
-
Field Summary
Fields Modifier and Type Field Description static List<DisplayOptions.PluralCategory>
VALUES
Unmodifiable List of all plural categories constants.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DisplayOptions.PluralCategory
fromIdentifier(String identifier)
String
getIdentifier()
static DisplayOptions.PluralCategory
valueOf(String name)
Returns 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 Detail
-
UNDEFINED
public static final DisplayOptions.PluralCategory 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
public static final DisplayOptions.PluralCategory ZERO
- Status:
- Stable ICU 72.
-
ONE
public static final DisplayOptions.PluralCategory ONE
- Status:
- Stable ICU 72.
-
TWO
public static final DisplayOptions.PluralCategory TWO
- Status:
- Stable ICU 72.
-
FEW
public static final DisplayOptions.PluralCategory FEW
- Status:
- Stable ICU 72.
-
MANY
public static final DisplayOptions.PluralCategory MANY
- Status:
- Stable ICU 72.
-
OTHER
public static final DisplayOptions.PluralCategory OTHER
- Status:
- Stable ICU 72.
-
-
Field Detail
-
VALUES
public static final List<DisplayOptions.PluralCategory> VALUES
Unmodifiable List of all plural categories constants. List version ofvalues()
.- Status:
- Stable ICU 72.
-
-
Method Detail
-
values
public static DisplayOptions.PluralCategory[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (DisplayOptions.PluralCategory c : DisplayOptions.PluralCategory.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DisplayOptions.PluralCategory valueOf(String name)
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
public final String getIdentifier()
- Returns:
- the lowercase CLDR keyword string for the plural category
- Status:
- Stable ICU 72.
-
fromIdentifier
public static final DisplayOptions.PluralCategory fromIdentifier(String identifier)
- Parameters:
identifier
- in lower case such as "few" or "other"- Returns:
- the plural category corresponding to the identifier, or
UNDEFINED
- Status:
- Stable ICU 72.
-
-