Stay organized with collections
Save and categorize content based on your preferences.
Field
open class Field : Format.Field
Defines constants that are used as attribute keys in the AttributedCharacterIterator
returned from MessageFormat.formatToCharacterIterator
.
Summary
Protected constructors |
Creates a Field with the specified name.
|
Protected methods |
open Any! |
Resolves instances being deserialized to the predefined constants.
|
Properties |
static MessageFormat.Field! |
Constant identifying a portion of a message that was generated from an argument passed into formatToCharacterIterator .
|
Protected constructors
Field
protected Field(name: String!)
Creates a Field with the specified name.
Parameters |
name |
String!: Name of the attribute |
Protected methods
readResolve
protected open fun readResolve(): Any!
Resolves instances being deserialized to the predefined constants.
Return |
Any! |
resolved MessageFormat.Field constant |
Exceptions |
java.io.InvalidObjectException |
if the constant could not be resolved. |
Properties
ARGUMENT
static val ARGUMENT: MessageFormat.Field!
Constant identifying a portion of a message that was generated from an argument passed into formatToCharacterIterator
. The value associated with the key will be an Integer
indicating the index in the arguments
array of the argument from which the text was generated.
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,["# MessageFormat.Field\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nField\n=====\n\n```\nopen class Field : Format.Field\n```\n\n|---|---|---|------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||||\n| ↳ | [java.text.AttributedCharacterIterator.Attribute](/reference/kotlin/java/text/AttributedCharacterIterator.Attribute) |||\n| | ↳ | [java.text.Format.Field](/reference/kotlin/java/text/Format.Field) ||\n| | | ↳ | [java.text.MessageFormat.Field](#) |\n\nDefines constants that are used as attribute keys in the `AttributedCharacterIterator` returned from `MessageFormat.formatToCharacterIterator`.\n\nSummary\n-------\n\n| Protected constructors ||\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [Field](#Field(kotlin.String))`(`name:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`)` Creates a Field with the specified name. |\n\n| Protected methods ||\n|----------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------|\n| open [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)! | [readResolve](#readResolve())`()` Resolves instances being deserialized to the predefined constants. |\n\n| Properties ||\n|----------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| static [MessageFormat.Field](#)! | [ARGUMENT](#ARGUMENT:java.text.MessageFormat.Field) Constant identifying a portion of a message that was generated from an argument passed into `formatToCharacterIterator`. |\n\nProtected constructors\n----------------------\n\n### Field\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nprotected Field(name: String!)\n```\n\nCreates a Field with the specified name.\n\n| Parameters ||\n|--------|----------------------------------------------------------------------------------------------------------|\n| `name` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!: Name of the attribute |\n\nProtected methods\n-----------------\n\n### readResolve\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nprotected open fun readResolve(): Any!\n```\n\nResolves instances being deserialized to the predefined constants.\n\n| Return ||\n|-----------------------------------------------------------------------------|---------------------------------------|\n| [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)! | resolved MessageFormat.Field constant |\n\n| Exceptions ||\n|----------------------------------|----------------------------------------|\n| `java.io.InvalidObjectException` | if the constant could not be resolved. |\n\nProperties\n----------\n\n### ARGUMENT\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val ARGUMENT: MessageFormat.Field!\n```\n\nConstant identifying a portion of a message that was generated from an argument passed into `formatToCharacterIterator`. The value associated with the key will be an `Integer` indicating the index in the `arguments` array of the argument from which the text was generated."]]