public interface FormattedValue
extends java.lang.CharSequence
Modifier and Type | Method and Description |
---|---|
<A extends java.lang.Appendable> |
appendTo(A appendable)
Appends the formatted string to an Appendable.
|
boolean |
nextPosition(ConstrainedFieldPosition cfpos)
Iterates over field positions in the FormattedValue.
|
java.text.AttributedCharacterIterator |
toCharacterIterator()
Exports the formatted number as an AttributedCharacterIterator.
|
java.lang.String |
toString()
Returns the formatted string as a Java String.
|
java.lang.String toString()
appendTo(A)
for greater efficiency.toString
in interface java.lang.CharSequence
toString
in class java.lang.Object
<A extends java.lang.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)
.java.text.AttributedCharacterIterator toCharacterIterator()
Consider using nextPosition(com.ibm.icu.text.ConstrainedFieldPosition)
if you are trying to get field information.
Copyright © 2016 Unicode, Inc. and others.