public interface FormattedValue extends CharSequence
| Modifier and Type | Method and Description |
|---|---|
<A extends Appendable> |
appendTo(A appendable)
Appends the formatted string to an Appendable.
|
boolean |
nextPosition(ConstrainedFieldPosition cfpos)
Iterates over field positions in the FormattedValue.
|
AttributedCharacterIterator |
toCharacterIterator()
Exports the formatted number as an AttributedCharacterIterator.
|
String |
toString()
Returns the formatted string as a Java String.
|
charAt, chars, codePoints, length, subSequenceString toString()
appendTo(A) for greater efficiency.toString in interface CharSequencetoString in class Object<A extends Appendable> A appendTo(A appendable)
If an IOException occurs when appending to the Appendable, an unchecked
ICUUncheckedIOException is thrown instead.
appendable - The Appendable to which to append the string output.boolean nextPosition(ConstrainedFieldPosition cfpos)
ConstrainableFieldPosition cfpos = new ConstrainableFieldPosition();
while (fmtval.nextPosition(cfpos)) {
// handle the field position; get information from cfpos
}
cfpos - The object used for iteration state. This can provide constraints to iterate over
only one specific field; see ConstrainedFieldPosition.constrainField(java.text.Format.Field).AttributedCharacterIterator toCharacterIterator()
Consider using nextPosition(com.ibm.icu.text.ConstrainedFieldPosition) if you are trying to get field information.
Copyright © 2016 Unicode, Inc. and others.