Stay organized with collections
Save and categorize content based on your preferences.
ArgType
class 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.
|
Enum values
CHOICE
enum val CHOICE : MessagePattern.ArgType
The argument is a ChoiceFormat with one or more ((ARG_INT | ARG_DOUBLE), ARG_SELECTOR, message) tuples.
PLURAL
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
enum val SELECT : MessagePattern.ArgType
The argument is a SelectFormat with one or more (ARG_SELECTOR, message) pairs.
SIMPLE
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
fun hasPluralStyle(): Boolean
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# MessagePattern.ArgType\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nArgType\n=======\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/icu/text/MessagePattern.ArgType \"View this page in Java\") \n\n```\nclass ArgType\n```\n\n|---|---|----------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) |||\n| ↳ | [kotlin.Enum](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html)\\\u003c[android.icu.text.MessagePattern.ArgType](#)\\\u003e ||\n| | ↳ | [android.icu.text.MessagePattern.ArgType](#) |\n\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known Direct Subclasses [MessagePattern.ArgType.CHOICE](#ENUM_VALUE:CHOICE), [MessagePattern.ArgType.NONE](#ENUM_VALUE:NONE), [MessagePattern.ArgType.PLURAL](#ENUM_VALUE:PLURAL), [MessagePattern.ArgType.SELECT](#ENUM_VALUE:SELECT), [MessagePattern.ArgType.SELECTORDINAL](#ENUM_VALUE:SELECTORDINAL), [MessagePattern.ArgType.SIMPLE](#ENUM_VALUE:SIMPLE) |-------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [MessagePattern.ArgType.CHOICE](#ENUM_VALUE:CHOICE) | The argument is a ChoiceFormat with one or more ((ARG_INT \\| ARG_DOUBLE), ARG_SELECTOR, message) tuples. | | [MessagePattern.ArgType.NONE](#ENUM_VALUE:NONE) | The argument has no specified type. | | [MessagePattern.ArgType.PLURAL](#ENUM_VALUE: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](#ENUM_VALUE:SELECT) | The argument is a SelectFormat with one or more (ARG_SELECTOR, message) pairs. | | [MessagePattern.ArgType.SELECTORDINAL](#ENUM_VALUE:SELECTORDINAL) | The argument is an ordinal-number PluralFormat with the same style parts sequence and semantics as [ArgType.PLURAL](#). | | [MessagePattern.ArgType.SIMPLE](#ENUM_VALUE:SIMPLE) | The argument has a \"simple\" type which is provided by the ARG_TYPE part. | |\n\nArgument 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.\n\nSummary\n-------\n\n| Enum values ||\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [CHOICE](#ENUM_VALUE:CHOICE) The argument is a ChoiceFormat with one or more ((ARG_INT \\| ARG_DOUBLE), ARG_SELECTOR, message) tuples. |\n| [NONE](#ENUM_VALUE:NONE) The argument has no specified type. |\n| [PLURAL](#ENUM_VALUE: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. |\n| [SELECT](#ENUM_VALUE:SELECT) The argument is a SelectFormat with one or more (ARG_SELECTOR, message) pairs. |\n| [SELECTORDINAL](#ENUM_VALUE:SELECTORDINAL) The argument is an ordinal-number PluralFormat with the same style parts sequence and semantics as [ArgType.PLURAL](#). |\n| [SIMPLE](#ENUM_VALUE:SIMPLE) The argument has a \"simple\" type which is provided by the ARG_TYPE part. |\n\n| Public methods ||\n|------------------------------------------------------------------------------------|------------------------------------------------|\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [hasPluralStyle](#hasPluralStyle())`()` \u003cbr /\u003e |\n\nEnum values\n-----------\n\n### CHOICE\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nenum val CHOICE : MessagePattern.ArgType\n```\n\nThe argument is a ChoiceFormat with one or more ((ARG_INT \\| ARG_DOUBLE), ARG_SELECTOR, message) tuples. \n\n### NONE\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nenum val NONE : MessagePattern.ArgType\n```\n\nThe argument has no specified type. \n\n### PLURAL\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nenum val PLURAL : MessagePattern.ArgType\n```\n\nThe 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. \n\n### SELECT\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nenum val SELECT : MessagePattern.ArgType\n```\n\nThe argument is a SelectFormat with one or more (ARG_SELECTOR, message) pairs. \n\n### SELECTORDINAL\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nenum val SELECTORDINAL : MessagePattern.ArgType\n```\n\nThe argument is an ordinal-number PluralFormat with the same style parts sequence and semantics as [ArgType.PLURAL](#). \n\n### SIMPLE\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nenum val SIMPLE : MessagePattern.ArgType\n```\n\nThe argument has a \"simple\" type which is provided by the ARG_TYPE part. An ARG_STYLE part might follow that.\n\nPublic methods\n--------------\n\n### hasPluralStyle\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun hasPluralStyle(): Boolean\n```\n\n| Return ||\n|------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------|\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | true if the argument type has a plural style part sequence and semantics, for example [ArgType.PLURAL](#) and [ArgType.SELECTORDINAL](#). |"]]