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, subSequence
String toString()
appendTo(A)
for greater efficiency.toString
in interface CharSequence
toString
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.ICUUncheckedIOException
- if the Appendable throws IOExceptionboolean nextPosition(ConstrainedFieldPosition cfpos)
ConstrainedFieldPosition cfpos = new ConstrainedFieldPosition(); 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.