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:
java.io.Serializable
,java.lang.Comparable<DisplayOptions.PluralCategory>
- Enclosing class:
- DisplayOptions
public static enum DisplayOptions.PluralCategory extends java.lang.Enum<DisplayOptions.PluralCategory>
Standard CLDR plural category constants. See http://www.unicode.org/reports/tr35/tr35-numbers.html#Language_Plural_Rules
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
identifier
static java.util.List<DisplayOptions.PluralCategory>
VALUES
Unmodifiable List of all plural categories constants.
-
Constructor Summary
Constructors Modifier Constructor Description private
PluralCategory(java.lang.String identifier)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DisplayOptions.PluralCategory
fromIdentifier(java.lang.String identifier)
java.lang.String
getIdentifier()
static DisplayOptions.PluralCategory
valueOf(java.lang.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).
-
ZERO
public static final DisplayOptions.PluralCategory ZERO
-
ONE
public static final DisplayOptions.PluralCategory ONE
-
TWO
public static final DisplayOptions.PluralCategory TWO
-
FEW
public static final DisplayOptions.PluralCategory FEW
-
MANY
public static final DisplayOptions.PluralCategory MANY
-
OTHER
public static final DisplayOptions.PluralCategory OTHER
-
-
Field Detail
-
identifier
private final java.lang.String identifier
-
VALUES
public static final java.util.List<DisplayOptions.PluralCategory> VALUES
Unmodifiable List of all plural categories constants. List version ofvalues()
.
-
-
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(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getIdentifier
public final java.lang.String getIdentifier()
- Returns:
- the lowercase CLDR keyword string for the plural category
-
fromIdentifier
public static final DisplayOptions.PluralCategory fromIdentifier(java.lang.String identifier)
- Parameters:
identifier
- in lower case such as "few" or "other"- Returns:
- the plural category corresponding to the identifier, or
UNDEFINED
-
-