com.ibm.icu.text
Enum MessagePattern.ArgType

java.lang.Object
  extended by java.lang.Enum<MessagePattern.ArgType>
      extended by com.ibm.icu.text.MessagePattern.ArgType
All Implemented Interfaces:
Serializable, Comparable<MessagePattern.ArgType>
Enclosing class:
MessagePattern

public static enum MessagePattern.ArgType
extends Enum<MessagePattern.ArgType>

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.

Status:
Draft ICU 4.8.

Enum Constant Summary
CHOICE
          The argument is a ChoiceFormat with one or more ((ARG_INT | ARG_DOUBLE), ARG_SELECTOR, message) tuples.
NONE
          The argument has no specified type.
PLURAL
          The argument is a PluralFormat with an optional ARG_INT or ARG_DOUBLE offset (e.g., offset:1) and one or more (ARG_SELECTOR [explicit-value] message) tuples.
SELECT
          The argument is a SelectFormat with one or more (ARG_SELECTOR, message) pairs.
SIMPLE
          The argument has a "simple" type which is provided by the ARG_TYPE part.
 
Method Summary
static MessagePattern.ArgType valueOf(String name)
          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.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

NONE

public static final MessagePattern.ArgType NONE
The argument has no specified type.

Status:
Draft ICU 4.8.

SIMPLE

public static final MessagePattern.ArgType SIMPLE
The argument has a "simple" type which is provided by the ARG_TYPE part. An ARG_STYLE part might follow that.

Status:
Draft ICU 4.8.

CHOICE

public static final MessagePattern.ArgType CHOICE
The argument is a ChoiceFormat with one or more ((ARG_INT | ARG_DOUBLE), ARG_SELECTOR, message) tuples.

Status:
Draft ICU 4.8.

PLURAL

public static final MessagePattern.ArgType PLURAL
The argument is a 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.

Status:
Draft ICU 4.8.

SELECT

public static final MessagePattern.ArgType SELECT
The argument is a SelectFormat with one or more (ARG_SELECTOR, message) pairs.

Status:
Draft ICU 4.8.
Method Detail

values

public static MessagePattern.ArgType[] 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 (MessagePattern.ArgType c : MessagePattern.ArgType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static MessagePattern.ArgType 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 name
NullPointerException - if the argument is null


Copyright (c) 2011 IBM Corporation and others.