public class FormattedNumberRange extends java.lang.Object implements FormattedValue
NumberRangeFormatter| Modifier and Type | Method and Description |
|---|---|
<A extends java.lang.Appendable> |
appendTo(A appendable)
Appends the formatted string to an Appendable.
|
char |
charAt(int index) |
boolean |
equals(java.lang.Object other) |
java.math.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.
|
java.math.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.
|
java.lang.CharSequence |
subSequence(int start,
int end) |
java.text.AttributedCharacterIterator |
toCharacterIterator()
Exports the formatted number as an AttributedCharacterIterator.
|
java.lang.String |
toString()
Returns the formatted string as a Java String.
|
public java.lang.String toString()
FormattedValue.appendTo(A) for greater efficiency.toString in interface FormattedValuetoString in interface java.lang.CharSequencetoString in class java.lang.Objectpublic <A extends java.lang.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 java.lang.CharSequencepublic int length()
length in interface java.lang.CharSequencepublic java.lang.CharSequence subSequence(int start,
int end)
subSequence in interface java.lang.CharSequencepublic boolean nextPosition(ConstrainedFieldPosition cfpos)
ConstrainedFieldPosition cfpos = new ConstrainedFieldPosition();
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 java.text.AttributedCharacterIterator toCharacterIterator()
Consider using FormattedValue.nextPosition(com.ibm.icu.text.ConstrainedFieldPosition) if you are trying to get field information.
toCharacterIterator in interface FormattedValuepublic java.math.BigDecimal getFirstBigDecimal()
NumberRangeFormatter,
getSecondBigDecimal()public java.math.BigDecimal getSecondBigDecimal()
NumberRangeFormatter,
getFirstBigDecimal()public NumberRangeFormatter.RangeIdentityResult getIdentityResult()
NumberRangeFormatter,
NumberRangeFormatter.RangeIdentityFallbackpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object other)
equals in class java.lang.Object@Deprecated public PluralRules.IFixedDecimal getFirstFixedDecimal()
@Deprecated public PluralRules.IFixedDecimal getSecondFixedDecimal()
Copyright ? 2016 Unicode, Inc. and others.