NumberFormatter
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final DecimalQuantity | fq
Deprecated
as a consequence of
DecimalQuantity being deprecated.
|
| pack-priv final String | |
| pack-priv final MeasureUnit | |
| pack-priv final FormattedStringBuilder |
| Access | Constructor and Description |
|---|---|
| pack-priv | FormattedNumber(FormattedStringBuilder nsb, DecimalQuantity fq, MeasureUnit outputUnit, String gender)
Deprecated
as a consequence of
DecimalQuantity being deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
| public <A extends Appendable> A | appendTo(A
The Appendable to which to append the string output. appendable)Implements com. |
| public char | charAt(int
the index of the index)char value to be returnedImplements java. char value at the specified index.
|
| public PluralRules. | |
| public String | |
| public DisplayOptions. | |
| public MeasureUnit | |
| public int | |
| public boolean | nextPosition(ConstrainedFieldPosition
The object used for iteration state. This can provide constraints to iterate over
only one specific field; see cfpos)ConstrainedFieldPosition#constrainField.Implements com. |
| public CharSequence | subSequence(int
the start index, inclusive start, int the end index, exclusive end)Implements java. CharSequence that is a subsequence of this sequence.
|
| public BigDecimal | Returns: A BigDecimal representation of the formatted number.Export the formatted number as a BigDecimal. |
| public AttributedCharacterIterator | toCharacterIterator()
Implements com. |
| public String | toString()
Overrides java. Implements com. |
| fq | back to summary |
|---|---|
| pack-priv final DecimalQuantity fq
Deprecated as a consequence of | |
| gender | back to summary |
|---|---|
| pack-priv final String gender | |
| outputUnit | back to summary |
|---|---|
| pack-priv final MeasureUnit outputUnit | |
| string | back to summary |
|---|---|
| pack-priv final FormattedStringBuilder string | |
| FormattedNumber | back to summary |
|---|---|
| pack-priv FormattedNumber(FormattedStringBuilder nsb, DecimalQuantity fq, MeasureUnit outputUnit, String gender)
Deprecated as a consequence of | |
| appendTo | back to summary |
|---|---|
| public <A extends Appendable> A appendTo(A appendable) Implements com. Doc from com. Appends the formatted string to an Appendable.
If an IOException occurs when appending to the Appendable, an unchecked
| |
| charAt | back to summary |
|---|---|
| public char charAt(int index) Implements java. Doc from java. Returns the If the | |
| getFixedDecimal | back to summary |
|---|---|
| public PluralRules. Deprecated This API is ICU internal only.
| |
| getGender | back to summary |
|---|---|
| public String getGender()
Deprecated This API is for technology preview only. The gender of the formatted output.
| |
| getNounClass | back to summary |
|---|---|
| public DisplayOptions. Gets the noun class of the formatted output. Returns
| |
| getOutputUnit | back to summary |
|---|---|
| public MeasureUnit getOutputUnit() Gets the resolved output unit. The output unit is dependent upon the localized preferences for the usage specified via NumberFormatterSettings.usage(), and may be a unit with MeasureUnit.Complexity.MIXED unit complexity (MeasureUnit.getComplexity()), such as "foot-and-inch" or "hour-and-minute-and-second".
| |
| length | back to summary |
|---|---|
| public int length() Implements java. Doc from java. Returns the length of this character sequence. The length is the number
of 16-bit | |
| nextPosition | back to summary |
|---|---|
| public boolean nextPosition(ConstrainedFieldPosition cfpos) Implements com. Doc from com. Iterates over field positions in the FormattedValue. This lets you determine the position of specific types of substrings, like a month or a decimal separator. To loop over all field positions:
ConstrainedFieldPosition cfpos = new ConstrainedFieldPosition();
while (fmtval.nextPosition(cfpos)) {
// handle the field position; get information from cfpos
}
| |
| subSequence | back to summary |
|---|---|
| public CharSequence subSequence(int start, int end) Implements java. Doc from java. Returns a
| |
| toBigDecimal | back to summary |
|---|---|
| public BigDecimal toBigDecimal() Export the formatted number as a BigDecimal. This endpoint is useful for obtaining the exact number being printed after scaling and rounding have been applied by the number formatting pipeline.
| |
| toCharacterIterator | back to summary |
|---|---|
| public AttributedCharacterIterator toCharacterIterator() Implements com. Doc from com. Exports the formatted number as an AttributedCharacterIterator.
Consider using
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Implements com. Doc from com. Returns the formatted string as a Java String.
Consider using | |