Stay organized with collections
Save and categorize content based on your preferences.
Field
open class Field : Format.Field
The instances of this inner class are used as attribute keys and values in AttributedCharacterIterator that NumberFormat.formatToCharacterIterator() method returns.
There is no public constructor to this class, the only instances are the constants defined here.
Summary
Protected constructors |
Constructs a new instance of NumberFormat.
|
Protected methods |
open Any! |
serizalization method resolve instances to the constant NumberFormat.
|
Protected constructors
Field
protected Field(fieldName: String!)
Constructs a new instance of NumberFormat.Field with the given field name.
Protected methods
readResolve
protected open fun readResolve(): Any!
serizalization method resolve instances to the constant NumberFormat.Field values
Return |
Any! |
the resolved Attribute object |
Exceptions |
java.io.InvalidObjectException |
if the object to resolve is not an instance of Attribute |
Properties
APPROXIMATELY_SIGN
static val APPROXIMATELY_SIGN: NumberFormat.Field!
Approximately sign. In ICU 70, this was categorized under the generic SIGN field.
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.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# NumberFormat.Field\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nField\n=====\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/icu/text/NumberFormat.Field \"View this page in Java\") \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](../../../java/text/AttributedCharacterIterator.Attribute.html#) |||\n| | ↳ | [java.text.Format.Field](../../../java/text/Format.Field.html#) ||\n| | | ↳ | [android.icu.text.NumberFormat.Field](#) |\n\nThe instances of this inner class are used as attribute keys and values in AttributedCharacterIterator that NumberFormat.formatToCharacterIterator() method returns.\n\nThere is no public constructor to this class, the only instances are the constants defined here.\n\n\u003cbr /\u003e\n\nSummary\n-------\n\n| Protected constructors ||\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [Field](#Field(kotlin.String))`(`fieldName:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`)` Constructs a new instance of NumberFormat. |\n\n| Protected methods ||\n|----------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| open [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)! | [readResolve](#readResolve())`()` serizalization method resolve instances to the constant NumberFormat. |\n\n| Properties ||\n|---------------------------------|---------------------------------------------------------------------------------------------------|\n| static [NumberFormat.Field](#)! | [APPROXIMATELY_SIGN](#APPROXIMATELY_SIGN:android.icu.text.NumberFormat.Field) Approximately sign. |\n| static [NumberFormat.Field](#)! | [COMPACT](#COMPACT:android.icu.text.NumberFormat.Field) \u003cbr /\u003e |\n| static [NumberFormat.Field](#)! | [CURRENCY](#CURRENCY:android.icu.text.NumberFormat.Field) \u003cbr /\u003e |\n| static [NumberFormat.Field](#)! | [DECIMAL_SEPARATOR](#DECIMAL_SEPARATOR:android.icu.text.NumberFormat.Field) \u003cbr /\u003e |\n| static [NumberFormat.Field](#)! | [EXPONENT](#EXPONENT:android.icu.text.NumberFormat.Field) \u003cbr /\u003e |\n| static [NumberFormat.Field](#)! | [EXPONENT_SIGN](#EXPONENT_SIGN:android.icu.text.NumberFormat.Field) \u003cbr /\u003e |\n| static [NumberFormat.Field](#)! | [EXPONENT_SYMBOL](#EXPONENT_SYMBOL:android.icu.text.NumberFormat.Field) \u003cbr /\u003e |\n| static [NumberFormat.Field](#)! | [FRACTION](#FRACTION:android.icu.text.NumberFormat.Field) \u003cbr /\u003e |\n| static [NumberFormat.Field](#)! | [GROUPING_SEPARATOR](#GROUPING_SEPARATOR:android.icu.text.NumberFormat.Field) \u003cbr /\u003e |\n| static [NumberFormat.Field](#)! | [INTEGER](#INTEGER:android.icu.text.NumberFormat.Field) \u003cbr /\u003e |\n| static [NumberFormat.Field](#)! | [MEASURE_UNIT](#MEASURE_UNIT:android.icu.text.NumberFormat.Field) \u003cbr /\u003e |\n| static [NumberFormat.Field](#)! | [PERCENT](#PERCENT:android.icu.text.NumberFormat.Field) \u003cbr /\u003e |\n| static [NumberFormat.Field](#)! | [PERMILLE](#PERMILLE:android.icu.text.NumberFormat.Field) \u003cbr /\u003e |\n| static [NumberFormat.Field](#)! | [SIGN](#SIGN:android.icu.text.NumberFormat.Field) \u003cbr /\u003e |\n\nProtected constructors\n----------------------\n\n### Field\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nprotected Field(fieldName: String!)\n```\n\nConstructs a new instance of NumberFormat.Field with the given field name.\n\nProtected methods\n-----------------\n\n### readResolve\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nprotected open fun readResolve(): Any!\n```\n\nserizalization method resolve instances to the constant NumberFormat.Field values\n\n| Return ||\n|-----------------------------------------------------------------------------|---------------------------------|\n| [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)! | the resolved `Attribute` object |\n\n| Exceptions ||\n|----------------------------------|------------------------------------------------------------|\n| `java.io.InvalidObjectException` | if the object to resolve is not an instance of `Attribute` |\n\nProperties\n----------\n\n### APPROXIMATELY_SIGN\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val APPROXIMATELY_SIGN: NumberFormat.Field!\n```\n\nApproximately sign. In ICU 70, this was categorized under the generic SIGN field. \n\n### COMPACT\n\nAdded in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val COMPACT: NumberFormat.Field!\n``` \n\n### CURRENCY\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val CURRENCY: NumberFormat.Field!\n``` \n\n### DECIMAL_SEPARATOR\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val DECIMAL_SEPARATOR: NumberFormat.Field!\n``` \n\n### EXPONENT\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val EXPONENT: NumberFormat.Field!\n``` \n\n### EXPONENT_SIGN\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val EXPONENT_SIGN: NumberFormat.Field!\n``` \n\n### EXPONENT_SYMBOL\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val EXPONENT_SYMBOL: NumberFormat.Field!\n``` \n\n### FRACTION\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val FRACTION: NumberFormat.Field!\n``` \n\n### GROUPING_SEPARATOR\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val GROUPING_SEPARATOR: NumberFormat.Field!\n``` \n\n### INTEGER\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val INTEGER: NumberFormat.Field!\n``` \n\n### MEASURE_UNIT\n\nAdded in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val MEASURE_UNIT: NumberFormat.Field!\n``` \n\n### PERCENT\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val PERCENT: NumberFormat.Field!\n``` \n\n### PERMILLE\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val PERMILLE: NumberFormat.Field!\n``` \n\n### SIGN\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val SIGN: NumberFormat.Field!\n```"]]