NumberFormat.Field (Java Platform SE 8 ) (original) (raw)
- java.text.AttributedCharacterIterator.Attribute
- java.text.Format.Field
- java.text.NumberFormat.Field
- java.text.Format.Field
All Implemented Interfaces:
Serializable
Enclosing class:
NumberFormat
public static class NumberFormat.Field
extends Format.Field
Defines constants that are used as attribute keys in theAttributedCharacterIterator
returned from NumberFormat.formatToCharacterIterator
and as field identifiers in FieldPosition
.
Since:
1.4
See Also:
Serialized Form
Field Summary
Fields
Modifier and Type Field Description static NumberFormat.Field CURRENCY Constant identifying the currency field. static NumberFormat.Field DECIMAL_SEPARATOR Constant identifying the decimal separator field. static NumberFormat.Field EXPONENT Constant identifying the exponent field. static NumberFormat.Field EXPONENT_SIGN Constant identifying the exponent sign field. static NumberFormat.Field EXPONENT_SYMBOL Constant identifying the exponent symbol field. static NumberFormat.Field FRACTION Constant identifying the fraction field. static NumberFormat.Field GROUPING_SEPARATOR Constant identifying the grouping separator field. static NumberFormat.Field INTEGER Constant identifying the integer field. static NumberFormat.Field PERCENT Constant identifying the percent field. static NumberFormat.Field PERMILLE Constant identifying the permille field. static NumberFormat.Field SIGN Constant identifying the sign field. * ### Fields inherited from class java.text.[AttributedCharacterIterator.Attribute](../../java/text/AttributedCharacterIterator.Attribute.html "class in java.text") `[INPUT_METHOD_SEGMENT](../../java/text/AttributedCharacterIterator.Attribute.html#INPUT%5FMETHOD%5FSEGMENT), [LANGUAGE](../../java/text/AttributedCharacterIterator.Attribute.html#LANGUAGE), [READING](../../java/text/AttributedCharacterIterator.Attribute.html#READING)`
Constructor Summary
Constructors
Modifier Constructor Description protected Field(String name) Creates a Field instance with the specified name. Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type Method Description protected Object readResolve() Resolves instances being deserialized to the predefined constants. * ### Methods inherited from class java.text.[AttributedCharacterIterator.Attribute](../../java/text/AttributedCharacterIterator.Attribute.html "class in java.text") `[equals](../../java/text/AttributedCharacterIterator.Attribute.html#equals-java.lang.Object-), [getName](../../java/text/AttributedCharacterIterator.Attribute.html#getName--), [hashCode](../../java/text/AttributedCharacterIterator.Attribute.html#hashCode--), [toString](../../java/text/AttributedCharacterIterator.Attribute.html#toString--)` * ### Methods inherited from class java.lang.[Object](../../java/lang/Object.html "class in java.lang") `[clone](../../java/lang/Object.html#clone--), [finalize](../../java/lang/Object.html#finalize--), [getClass](../../java/lang/Object.html#getClass--), [notify](../../java/lang/Object.html#notify--), [notifyAll](../../java/lang/Object.html#notifyAll--), [wait](../../java/lang/Object.html#wait--), [wait](../../java/lang/Object.html#wait-long-), [wait](../../java/lang/Object.html#wait-long-int-)`
Field Detail
* #### INTEGER public static final [NumberFormat.Field](../../java/text/NumberFormat.Field.html "class in java.text") INTEGER Constant identifying the integer field. * #### FRACTION public static final [NumberFormat.Field](../../java/text/NumberFormat.Field.html "class in java.text") FRACTION Constant identifying the fraction field. * #### EXPONENT public static final [NumberFormat.Field](../../java/text/NumberFormat.Field.html "class in java.text") EXPONENT Constant identifying the exponent field. * #### DECIMAL\_SEPARATOR public static final [NumberFormat.Field](../../java/text/NumberFormat.Field.html "class in java.text") DECIMAL_SEPARATOR Constant identifying the decimal separator field. * #### SIGN public static final [NumberFormat.Field](../../java/text/NumberFormat.Field.html "class in java.text") SIGN Constant identifying the sign field. * #### GROUPING\_SEPARATOR public static final [NumberFormat.Field](../../java/text/NumberFormat.Field.html "class in java.text") GROUPING_SEPARATOR Constant identifying the grouping separator field. * #### EXPONENT\_SYMBOL public static final [NumberFormat.Field](../../java/text/NumberFormat.Field.html "class in java.text") EXPONENT_SYMBOL Constant identifying the exponent symbol field. * #### PERCENT public static final [NumberFormat.Field](../../java/text/NumberFormat.Field.html "class in java.text") PERCENT Constant identifying the percent field. * #### PERMILLE public static final [NumberFormat.Field](../../java/text/NumberFormat.Field.html "class in java.text") PERMILLE Constant identifying the permille field. * #### CURRENCY public static final [NumberFormat.Field](../../java/text/NumberFormat.Field.html "class in java.text") CURRENCY Constant identifying the currency field. * #### EXPONENT\_SIGN public static final [NumberFormat.Field](../../java/text/NumberFormat.Field.html "class in java.text") EXPONENT_SIGN Constant identifying the exponent sign field.
Constructor Detail
* #### Field protected Field([String](../../java/lang/String.html "class in java.lang") name) Creates a Field instance with the specified name. Parameters: `name` \- Name of the attribute
Method Detail
* #### readResolve protected [Object](../../java/lang/Object.html "class in java.lang") readResolve() throws [InvalidObjectException](../../java/io/InvalidObjectException.html "class in java.io") Resolves instances being deserialized to the predefined constants. Overrides: `[readResolve](../../java/text/AttributedCharacterIterator.Attribute.html#readResolve--)` in class `[AttributedCharacterIterator.Attribute](../../java/text/AttributedCharacterIterator.Attribute.html "class in java.text")` Returns: resolved NumberFormat.Field constant Throws: `[InvalidObjectException](../../java/io/InvalidObjectException.html "class in java.io")` \- if the constant could not be resolved.
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2025, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.