Skip to content

Most visited

Recently visited

navigation

MessagePattern.ArgType

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

java.lang.Object
   ↳ java.lang.Enum<android.icu.text.MessagePattern.ArgType>
     ↳ android.icu.text.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.

Summary

Enum values

MessagePattern.ArgType  CHOICE

The argument is a ChoiceFormat with one or more ((ARG_INT | ARG_DOUBLE), ARG_SELECTOR, message) tuples. 

MessagePattern.ArgType  NONE

The argument has no specified type. 

MessagePattern.ArgType  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. 

MessagePattern.ArgType  SELECT

The argument is a SelectFormat with one or more (ARG_SELECTOR, message) pairs. 

MessagePattern.ArgType  SELECTORDINAL

The argument is an ordinal-number PluralFormat with the same style parts sequence and semantics as PLURAL

MessagePattern.ArgType  SIMPLE

The argument has a "simple" type which is provided by the ARG_TYPE part. 

Public methods

boolean hasPluralStyle()
static MessagePattern.ArgType valueOf(String name)
static final ArgType[] values()

Inherited methods

From class java.lang.Enum
From class java.lang.Object
From interface java.lang.Comparable

Enum values

CHOICE

added in API level 24
MessagePattern.ArgType CHOICE

The argument is a ChoiceFormat with one or more ((ARG_INT | ARG_DOUBLE), ARG_SELECTOR, message) tuples.

NONE

added in API level 24
MessagePattern.ArgType NONE

The argument has no specified type.

PLURAL

added in API level 24
MessagePattern.ArgType 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

added in API level 24
MessagePattern.ArgType SELECT

The argument is a SelectFormat with one or more (ARG_SELECTOR, message) pairs.

SELECTORDINAL

added in API level 24
MessagePattern.ArgType SELECTORDINAL

The argument is an ordinal-number PluralFormat with the same style parts sequence and semantics as PLURAL.

SIMPLE

added in API level 24
MessagePattern.ArgType SIMPLE

The argument has a "simple" type which is provided by the ARG_TYPE part. An ARG_STYLE part might follow that.

Public methods

hasPluralStyle

added in API level 24
boolean hasPluralStyle ()

Returns
boolean true if the argument type has a plural style part sequence and semantics, for example PLURAL and SELECTORDINAL.

valueOf

added in API level 24
MessagePattern.ArgType valueOf (String name)

Parameters
name String

Returns
MessagePattern.ArgType

values

added in API level 24
ArgType[] values ()

Returns
ArgType[]

This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Follow Google Developers on WeChat

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience.
(Sep 2017 survey)