public class FormattedNumberRange extends Object implements FormattedValue
NumberRangeFormatter| Modifier and Type | Method and Description |
|---|---|
<A extends Appendable> |
appendTo(A appendable)
Appends the formatted string to an Appendable.
|
char |
charAt(int index) |
boolean |
equals(Object other) |
BigDecimal |
getFirstBigDecimal()
Export the first formatted number as a BigDecimal.
|
PluralRules.IFixedDecimal |
getFirstFixedDecimal()
Deprecated.
This API is ICU internal only.
|
NumberRangeFormatter.RangeIdentityResult |
getIdentityResult()
Returns whether the pair of numbers was successfully formatted as a range or whether an identity fallback was
used.
|
BigDecimal |
getSecondBigDecimal()
Export the second formatted number as a BigDecimal.
|
PluralRules.IFixedDecimal |
getSecondFixedDecimal()
Deprecated.
This API is ICU internal only.
|
int |
hashCode() |
int |
length() |
boolean |
nextPosition(ConstrainedFieldPosition cfpos)
Iterates over field positions in the FormattedValue.
|
CharSequence |
subSequence(int start,
int end) |
AttributedCharacterIterator |
toCharacterIterator()
Exports the formatted number as an AttributedCharacterIterator.
|
String |
toString()
Returns the formatted string as a Java String.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitchars, codePointspublic String toString()
FormattedValue.appendTo(A) for greater efficiency.toString in interface FormattedValuetoString in interface CharSequencetoString in class Objectpublic <A extends Appendable> A appendTo(A appendable)
If an IOException occurs when appending to the Appendable, an unchecked
ICUUncheckedIOException is thrown instead.
appendTo in interface FormattedValueappendable - The Appendable to which to append the string output.public char charAt(int index)
charAt in interface CharSequencepublic int length()
length in interface CharSequencepublic CharSequence subSequence(int start, int end)
subSequence in interface CharSequencepublic boolean nextPosition(ConstrainedFieldPosition cfpos)
ConstrainableFieldPosition cfpos = new ConstrainableFieldPosition();
while (fmtval.nextPosition(cfpos)) {
// handle the field position; get information from cfpos
}
nextPosition in interface FormattedValuecfpos - The object used for iteration state. This can provide constraints to iterate over
only one specific field; see ConstrainedFieldPosition.constrainField(java.text.Format.Field).public AttributedCharacterIterator toCharacterIterator()
Consider using FormattedValue.nextPosition(com.ibm.icu.text.ConstrainedFieldPosition) if you are trying to get field information.
toCharacterIterator in interface FormattedValuepublic BigDecimal getFirstBigDecimal()
NumberRangeFormatter,
getSecondBigDecimal()public BigDecimal getSecondBigDecimal()
NumberRangeFormatter,
getFirstBigDecimal()public NumberRangeFormatter.RangeIdentityResult getIdentityResult()
NumberRangeFormatter,
NumberRangeFormatter.RangeIdentityFallback@Deprecated public PluralRules.IFixedDecimal getFirstFixedDecimal()
@Deprecated public PluralRules.IFixedDecimal getSecondFixedDecimal()
Copyright © 2016 Unicode, Inc. and others.