Added in API level 24

ArgType


class ArgType
kotlin.Any
   ↳ kotlin.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

The 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 as ArgType#PLURAL.

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

Public methods
Boolean

Enum values

CHOICE

Added in API level 24
enum val CHOICE : MessagePattern.ArgType

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

NONE

Added in API level 24
enum val NONE : MessagePattern.ArgType

The argument has no specified type.

PLURAL

Added in API level 24
enum val PLURAL : MessagePattern.ArgType

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
enum val SELECT : MessagePattern.ArgType

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

SELECTORDINAL

Added in API level 24
enum val SELECTORDINAL : MessagePattern.ArgType

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

SIMPLE

Added in API level 24
enum val SIMPLE : MessagePattern.ArgType

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
fun hasPluralStyle(): Boolean
Return
Boolean true if the argument type has a plural style part sequence and semantics, for example ArgType#PLURAL and ArgType#SELECTORDINAL.