public static final class DateIntervalFormat.FormattedDateInterval extends Object implements FormattedValue
Modifier and Type | Method and Description |
---|---|
<A extends Appendable> |
appendTo(A appendable)
Appends the formatted string to an Appendable.
|
char |
charAt(int index) |
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, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
chars, codePoints
public String toString()
FormattedValue.appendTo(A)
for greater efficiency.toString
in interface FormattedValue
toString
in interface CharSequence
toString
in class Object
public int length()
length
in interface CharSequence
public char charAt(int index)
charAt
in interface CharSequence
public CharSequence subSequence(int start, int end)
subSequence
in interface CharSequence
public <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 FormattedValue
appendable
- The Appendable to which to append the string output.public boolean nextPosition(ConstrainedFieldPosition cfpos)
ConstrainedFieldPosition cfpos = new ConstrainedFieldPosition(); while (fmtval.nextPosition(cfpos)) { // handle the field position; get information from cfpos }
nextPosition
in interface FormattedValue
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)
.public AttributedCharacterIterator toCharacterIterator()
Consider using FormattedValue.nextPosition(com.ibm.icu.text.ConstrainedFieldPosition)
if you are trying to get field information.
toCharacterIterator
in interface FormattedValue
Copyright © 2016 Unicode, Inc. and others.