Package com.ibm.icu.text
Enum MessagePattern.ArgType
- All Implemented Interfaces:
Serializable
,Comparable<MessagePattern.ArgType>
,java.lang.constant.Constable
- Enclosing class:
MessagePattern
Argument type constants.
Returned by Part.getArgType() for ARG_START and ARG_LIMIT parts.
Messages nested inside an argument are each delimited by MSG_START and MSG_LIMIT,
with a nesting level one greater than the surrounding message.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe argument is a ChoiceFormat with one or more ((ARG_INT | ARG_DOUBLE), ARG_SELECTOR, message) tuples.The argument has no specified type.The argument is a cardinal-number PluralFormat with an optional ARG_INT or ARG_DOUBLE offset (e.g., offset:1) and one or more (ARG_SELECTOR [explicit-value] message) tuples.The argument is a SelectFormat with one or more (ARG_SELECTOR, message) pairs.The argument is an ordinal-number PluralFormat with the same style parts sequence and semantics asPLURAL
.The argument has a "simple" type which is provided by the ARG_TYPE part. -
Method Summary
Modifier and TypeMethodDescriptionboolean
static MessagePattern.ArgType
Returns the enum constant of this type with the specified name.static MessagePattern.ArgType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
NONE
The argument has no specified type. -
SIMPLE
The argument has a "simple" type which is provided by the ARG_TYPE part. An ARG_STYLE part might follow that. -
CHOICE
The argument is a ChoiceFormat with one or more ((ARG_INT | ARG_DOUBLE), ARG_SELECTOR, message) tuples. -
PLURAL
The argument is a cardinal-number PluralFormat with an optional ARG_INT or ARG_DOUBLE offset (e.g., offset:1) and one or more (ARG_SELECTOR [explicit-value] message) tuples. If the selector has an explicit value (e.g., =2), then that value is provided by the ARG_INT or ARG_DOUBLE part preceding the message. Otherwise the message immediately follows the ARG_SELECTOR. -
SELECT
The argument is a SelectFormat with one or more (ARG_SELECTOR, message) pairs. -
SELECTORDINAL
The argument is an ordinal-number PluralFormat with the same style parts sequence and semantics asPLURAL
.
-
-
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
-
hasPluralStyle
public boolean hasPluralStyle()- Returns:
- true if the argument type has a plural style part sequence and semantics,
for example
PLURAL
andSELECTORDINAL
.
-