# NumberFormat.Field

Added in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# Field

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/icu/text/NumberFormat.Field "View this page in Java")  

```
open class Field : Format.Field
```

|---|---|---|----------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                   ||||
| ↳ | [java.text.AttributedCharacterIterator.Attribute](https://developer.android.com/reference/kotlin/java/text/AttributedCharacterIterator.Attribute.html#) |||
|   | ↳ | [java.text.Format.Field](https://developer.android.com/reference/kotlin/java/text/Format.Field.html#)                         ||
|   |   | ↳ | [android.icu.text.NumberFormat.Field](https://developer.android.com/reference/kotlin/android/icu/text/NumberFormat.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.

<br />

## Summary

|                                                                                                                       Protected constructors                                                                                                                       ||
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [Field](https://developer.android.com/reference/kotlin/android/icu/text/NumberFormat.Field#Field(kotlin.String))`(`fieldName:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`)` Constructs a new instance of NumberFormat. |

|                                                                                                                             Protected methods                                                                                                                              ||
|---------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| open[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)! | [readResolve](https://developer.android.com/reference/kotlin/android/icu/text/NumberFormat.Field#readResolve())`()` serizalization method resolve instances to the constant NumberFormat. |

|                                                                                                                                              Properties                                                                                                                                               ||
|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| static[NumberFormat.Field](https://developer.android.com/reference/kotlin/android/icu/text/NumberFormat.Field#)! | [APPROXIMATELY_SIGN](https://developer.android.com/reference/kotlin/android/icu/text/NumberFormat.Field#APPROXIMATELY_SIGN:android.icu.text.NumberFormat.Field) Approximately sign. |
| static[NumberFormat.Field](https://developer.android.com/reference/kotlin/android/icu/text/NumberFormat.Field#)! | [COMPACT](https://developer.android.com/reference/kotlin/android/icu/text/NumberFormat.Field#COMPACT:android.icu.text.NumberFormat.Field) <br />                                    |
| static[NumberFormat.Field](https://developer.android.com/reference/kotlin/android/icu/text/NumberFormat.Field#)! | [CURRENCY](https://developer.android.com/reference/kotlin/android/icu/text/NumberFormat.Field#CURRENCY:android.icu.text.NumberFormat.Field) <br />                                  |
| static[NumberFormat.Field](https://developer.android.com/reference/kotlin/android/icu/text/NumberFormat.Field#)! | [DECIMAL_SEPARATOR](https://developer.android.com/reference/kotlin/android/icu/text/NumberFormat.Field#DECIMAL_SEPARATOR:android.icu.text.NumberFormat.Field) <br />                |
| static[NumberFormat.Field](https://developer.android.com/reference/kotlin/android/icu/text/NumberFormat.Field#)! | [EXPONENT](https://developer.android.com/reference/kotlin/android/icu/text/NumberFormat.Field#EXPONENT:android.icu.text.NumberFormat.Field) <br />                                  |
| static[NumberFormat.Field](https://developer.android.com/reference/kotlin/android/icu/text/NumberFormat.Field#)! | [EXPONENT_SIGN](https://developer.android.com/reference/kotlin/android/icu/text/NumberFormat.Field#EXPONENT_SIGN:android.icu.text.NumberFormat.Field) <br />                        |
| static[NumberFormat.Field](https://developer.android.com/reference/kotlin/android/icu/text/NumberFormat.Field#)! | [EXPONENT_SYMBOL](https://developer.android.com/reference/kotlin/android/icu/text/NumberFormat.Field#EXPONENT_SYMBOL:android.icu.text.NumberFormat.Field) <br />                    |
| static[NumberFormat.Field](https://developer.android.com/reference/kotlin/android/icu/text/NumberFormat.Field#)! | [FRACTION](https://developer.android.com/reference/kotlin/android/icu/text/NumberFormat.Field#FRACTION:android.icu.text.NumberFormat.Field) <br />                                  |
| static[NumberFormat.Field](https://developer.android.com/reference/kotlin/android/icu/text/NumberFormat.Field#)! | [GROUPING_SEPARATOR](https://developer.android.com/reference/kotlin/android/icu/text/NumberFormat.Field#GROUPING_SEPARATOR:android.icu.text.NumberFormat.Field) <br />              |
| static[NumberFormat.Field](https://developer.android.com/reference/kotlin/android/icu/text/NumberFormat.Field#)! | [INTEGER](https://developer.android.com/reference/kotlin/android/icu/text/NumberFormat.Field#INTEGER:android.icu.text.NumberFormat.Field) <br />                                    |
| static[NumberFormat.Field](https://developer.android.com/reference/kotlin/android/icu/text/NumberFormat.Field#)! | [MEASURE_UNIT](https://developer.android.com/reference/kotlin/android/icu/text/NumberFormat.Field#MEASURE_UNIT:android.icu.text.NumberFormat.Field) <br />                          |
| static[NumberFormat.Field](https://developer.android.com/reference/kotlin/android/icu/text/NumberFormat.Field#)! | [PERCENT](https://developer.android.com/reference/kotlin/android/icu/text/NumberFormat.Field#PERCENT:android.icu.text.NumberFormat.Field) <br />                                    |
| static[NumberFormat.Field](https://developer.android.com/reference/kotlin/android/icu/text/NumberFormat.Field#)! | [PERMILLE](https://developer.android.com/reference/kotlin/android/icu/text/NumberFormat.Field#PERMILLE:android.icu.text.NumberFormat.Field) <br />                                  |
| static[NumberFormat.Field](https://developer.android.com/reference/kotlin/android/icu/text/NumberFormat.Field#)! | [SIGN](https://developer.android.com/reference/kotlin/android/icu/text/NumberFormat.Field#SIGN:android.icu.text.NumberFormat.Field) <br />                                          |

## Protected constructors

### Field

Added in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
protected Field(fieldName: String!)
```

Constructs a new instance of NumberFormat.Field with the given field name.

## Protected methods

### readResolve

Added in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
protected open fun readResolve(): Any!
```

serizalization method resolve instances to the constant NumberFormat.Field values

|                                                   Return                                                   ||
|-----------------------------------------------------------------------------|-------------------------------|
| [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)! | the resolved`Attribute`object |

|                                         Exceptions                                          ||
|----------------------------------|-----------------------------------------------------------|
| `java.io.InvalidObjectException` | if the object to resolve is not an instance of`Attribute` |

## Properties

### APPROXIMATELY_SIGN

Added in[API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val APPROXIMATELY_SIGN: NumberFormat.Field!
```

Approximately sign. In ICU 70, this was categorized under the generic SIGN field.  

### COMPACT

Added in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val COMPACT: NumberFormat.Field!
```  

### CURRENCY

Added in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val CURRENCY: NumberFormat.Field!
```  

### DECIMAL_SEPARATOR

Added in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val DECIMAL_SEPARATOR: NumberFormat.Field!
```  

### EXPONENT

Added in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val EXPONENT: NumberFormat.Field!
```  

### EXPONENT_SIGN

Added in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val EXPONENT_SIGN: NumberFormat.Field!
```  

### EXPONENT_SYMBOL

Added in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val EXPONENT_SYMBOL: NumberFormat.Field!
```  

### FRACTION

Added in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val FRACTION: NumberFormat.Field!
```  

### GROUPING_SEPARATOR

Added in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val GROUPING_SEPARATOR: NumberFormat.Field!
```  

### INTEGER

Added in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val INTEGER: NumberFormat.Field!
```  

### MEASURE_UNIT

Added in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val MEASURE_UNIT: NumberFormat.Field!
```  

### PERCENT

Added in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val PERCENT: NumberFormat.Field!
```  

### PERMILLE

Added in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val PERMILLE: NumberFormat.Field!
```  

### SIGN

Added in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val SIGN: NumberFormat.Field!
```