# NumberFormat.Field

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

# Field

```
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) |||
|   | ↳ | [java.text.Format.Field](https://developer.android.com/reference/kotlin/java/text/Format.Field)                 ||
|   |   | ↳ | [java.text.NumberFormat.Field](https://developer.android.com/reference/kotlin/java/text/NumberFormat.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                                                                                                                    ||
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [Field](https://developer.android.com/reference/kotlin/java/text/NumberFormat.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. |

|                                                                                                                        Protected methods                                                                                                                        ||
|--------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| open[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) | [readResolve](https://developer.android.com/reference/kotlin/java/text/NumberFormat.Field#readResolve())`()` Resolves instances being deserialized to the predefined constants. |

|                                                                                                                                                   Properties                                                                                                                                                   ||
|----------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| static[NumberFormat.Field](https://developer.android.com/reference/kotlin/java/text/NumberFormat.Field#) | [CURRENCY](https://developer.android.com/reference/kotlin/java/text/NumberFormat.Field#CURRENCY:java.text.NumberFormat.Field) Constant identifying the currency field.                               |
| static[NumberFormat.Field](https://developer.android.com/reference/kotlin/java/text/NumberFormat.Field#) | [DECIMAL_SEPARATOR](https://developer.android.com/reference/kotlin/java/text/NumberFormat.Field#DECIMAL_SEPARATOR:java.text.NumberFormat.Field) Constant identifying the decimal separator field.    |
| static[NumberFormat.Field](https://developer.android.com/reference/kotlin/java/text/NumberFormat.Field#) | [EXPONENT](https://developer.android.com/reference/kotlin/java/text/NumberFormat.Field#EXPONENT:java.text.NumberFormat.Field) Constant identifying the exponent field.                               |
| static[NumberFormat.Field](https://developer.android.com/reference/kotlin/java/text/NumberFormat.Field#) | [EXPONENT_SIGN](https://developer.android.com/reference/kotlin/java/text/NumberFormat.Field#EXPONENT_SIGN:java.text.NumberFormat.Field) Constant identifying the exponent sign field.                |
| static[NumberFormat.Field](https://developer.android.com/reference/kotlin/java/text/NumberFormat.Field#) | [EXPONENT_SYMBOL](https://developer.android.com/reference/kotlin/java/text/NumberFormat.Field#EXPONENT_SYMBOL:java.text.NumberFormat.Field) Constant identifying the exponent symbol field.          |
| static[NumberFormat.Field](https://developer.android.com/reference/kotlin/java/text/NumberFormat.Field#) | [FRACTION](https://developer.android.com/reference/kotlin/java/text/NumberFormat.Field#FRACTION:java.text.NumberFormat.Field) Constant identifying the fraction field.                               |
| static[NumberFormat.Field](https://developer.android.com/reference/kotlin/java/text/NumberFormat.Field#) | [GROUPING_SEPARATOR](https://developer.android.com/reference/kotlin/java/text/NumberFormat.Field#GROUPING_SEPARATOR:java.text.NumberFormat.Field) Constant identifying the grouping separator field. |
| static[NumberFormat.Field](https://developer.android.com/reference/kotlin/java/text/NumberFormat.Field#) | [INTEGER](https://developer.android.com/reference/kotlin/java/text/NumberFormat.Field#INTEGER:java.text.NumberFormat.Field) Constant identifying the integer field.                                  |
| static[NumberFormat.Field](https://developer.android.com/reference/kotlin/java/text/NumberFormat.Field#) | [PERCENT](https://developer.android.com/reference/kotlin/java/text/NumberFormat.Field#PERCENT:java.text.NumberFormat.Field) Constant identifying the percent field.                                  |
| static[NumberFormat.Field](https://developer.android.com/reference/kotlin/java/text/NumberFormat.Field#) | [PERMILLE](https://developer.android.com/reference/kotlin/java/text/NumberFormat.Field#PERMILLE:java.text.NumberFormat.Field) Constant identifying the permille field.                               |
| static[NumberFormat.Field](https://developer.android.com/reference/kotlin/java/text/NumberFormat.Field#) | [SIGN](https://developer.android.com/reference/kotlin/java/text/NumberFormat.Field#SIGN:java.text.NumberFormat.Field) Constant identifying the sign field.                                           |

## Protected constructors

### Field

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

```
protected Field(name: String)
```

Creates a Field instance with the specified name.

|                                                   Parameters                                                   ||
|--------|--------------------------------------------------------------------------------------------------------|
| `name` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html):Name of the attribute |

## Protected methods

### readResolve

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

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

Resolves instances being deserialized to the predefined constants.

|                                                      Return                                                      ||
|----------------------------------------------------------------------------|--------------------------------------|
| [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) | resolved NumberFormat.Field constant |

|                                Exceptions                                ||
|----------------------------------|----------------------------------------|
| `java.io.InvalidObjectException` | if the constant could not be resolved. |

## Properties

### CURRENCY

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

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

Constant identifying the currency field.  

### DECIMAL_SEPARATOR

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

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

Constant identifying the decimal separator field.  

### EXPONENT

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

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

Constant identifying the exponent field.  

### EXPONENT_SIGN

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

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

Constant identifying the exponent sign field.  

### EXPONENT_SYMBOL

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

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

Constant identifying the exponent symbol field.  

### FRACTION

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

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

Constant identifying the fraction field.  

### GROUPING_SEPARATOR

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

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

Constant identifying the grouping separator field.  

### INTEGER

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

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

Constant identifying the integer field.  

### PERCENT

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

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

Constant identifying the percent field.  

### PERMILLE

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

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

Constant identifying the permille field.  

### SIGN

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

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

Constant identifying the sign field.