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 NumberFormat.formatToCharacterIterator
and as field identifiers in FieldPosition
.
Summary
Protected constructors |
Creates a Field instance with the specified name.
|
Protected methods |
open Any |
Resolves instances being deserialized to the predefined constants.
|
Protected constructors
Field
protected Field(name: String)
Creates a Field instance 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 NumberFormat.Field constant |
Exceptions |
java.io.InvalidObjectException |
if the constant could not be resolved. |
Properties
DECIMAL_SEPARATOR
static val DECIMAL_SEPARATOR: NumberFormat.Field
Constant identifying the decimal separator field.
EXPONENT_SIGN
static val EXPONENT_SIGN: NumberFormat.Field
Constant identifying the exponent sign field.
EXPONENT_SYMBOL
static val EXPONENT_SYMBOL: NumberFormat.Field
Constant identifying the exponent symbol field.
GROUPING_SEPARATOR
static val GROUPING_SEPARATOR: NumberFormat.Field
Constant identifying the grouping separator 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.
[[["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,["# NumberFormat.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.NumberFormat.Field](#) |\n\nDefines constants that are used as attribute keys in the `AttributedCharacterIterator` returned from `NumberFormat.formatToCharacterIterator` and as field identifiers in `FieldPosition`.\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 instance 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 [NumberFormat.Field](#) | [CURRENCY](#CURRENCY:java.text.NumberFormat.Field) Constant identifying the currency field. |\n| static [NumberFormat.Field](#) | [DECIMAL_SEPARATOR](#DECIMAL_SEPARATOR:java.text.NumberFormat.Field) Constant identifying the decimal separator field. |\n| static [NumberFormat.Field](#) | [EXPONENT](#EXPONENT:java.text.NumberFormat.Field) Constant identifying the exponent field. |\n| static [NumberFormat.Field](#) | [EXPONENT_SIGN](#EXPONENT_SIGN:java.text.NumberFormat.Field) Constant identifying the exponent sign field. |\n| static [NumberFormat.Field](#) | [EXPONENT_SYMBOL](#EXPONENT_SYMBOL:java.text.NumberFormat.Field) Constant identifying the exponent symbol field. |\n| static [NumberFormat.Field](#) | [FRACTION](#FRACTION:java.text.NumberFormat.Field) Constant identifying the fraction field. |\n| static [NumberFormat.Field](#) | [GROUPING_SEPARATOR](#GROUPING_SEPARATOR:java.text.NumberFormat.Field) Constant identifying the grouping separator field. |\n| static [NumberFormat.Field](#) | [INTEGER](#INTEGER:java.text.NumberFormat.Field) Constant identifying the integer field. |\n| static [NumberFormat.Field](#) | [PERCENT](#PERCENT:java.text.NumberFormat.Field) Constant identifying the percent field. |\n| static [NumberFormat.Field](#) | [PERMILLE](#PERMILLE:java.text.NumberFormat.Field) Constant identifying the permille field. |\n| static [NumberFormat.Field](#) | [SIGN](#SIGN:java.text.NumberFormat.Field) Constant identifying the sign field. |\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 instance 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 NumberFormat.Field constant |\n\n| Exceptions ||\n|----------------------------------|----------------------------------------|\n| `java.io.InvalidObjectException` | if the constant could not be resolved. |\n\nProperties\n----------\n\n### CURRENCY\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val CURRENCY: NumberFormat.Field\n```\n\nConstant identifying the currency field. \n\n### DECIMAL_SEPARATOR\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val DECIMAL_SEPARATOR: NumberFormat.Field\n```\n\nConstant identifying the decimal separator field. \n\n### EXPONENT\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val EXPONENT: NumberFormat.Field\n```\n\nConstant identifying the exponent field. \n\n### EXPONENT_SIGN\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val EXPONENT_SIGN: NumberFormat.Field\n```\n\nConstant identifying the exponent sign field. \n\n### EXPONENT_SYMBOL\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val EXPONENT_SYMBOL: NumberFormat.Field\n```\n\nConstant identifying the exponent symbol field. \n\n### FRACTION\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val FRACTION: NumberFormat.Field\n```\n\nConstant identifying the fraction field. \n\n### GROUPING_SEPARATOR\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val GROUPING_SEPARATOR: NumberFormat.Field\n```\n\nConstant identifying the grouping separator field. \n\n### INTEGER\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val INTEGER: NumberFormat.Field\n```\n\nConstant identifying the integer field. \n\n### PERCENT\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val PERCENT: NumberFormat.Field\n```\n\nConstant identifying the percent field. \n\n### PERMILLE\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val PERMILLE: NumberFormat.Field\n```\n\nConstant identifying the permille field. \n\n### SIGN\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val SIGN: NumberFormat.Field\n```\n\nConstant identifying the sign field."]]