Top Description Constructors Methods
com.ibm.icu.message2

public Class FormattedMessage

extends Object
implements FormattedValue
Class Inheritance
All Implemented Interfaces
com.ibm.icu.text.FormattedValue, java.lang.CharSequence
Annotations
@Deprecated
Imports
java.text.AttributedCharacterIterator, com.ibm.icu.text.ConstrainedFieldPosition, .FormattedValue

Deprecated

This API is for ICU internal use only.

Not yet implemented: The result of a message formatting operation.

This contains information about where the various fields and placeholders ended up in the final result.

This class allows the result to be exported in several data types, including a String, AttributedCharacterIterator, more (TBD).

ICU Status
Internal ICU component: 72 technology preview

Constructor Summary

AccessConstructor and Description
public
FormattedMessage()

Deprecated This API is for ICU internal use only.
Not yet implemented.

Method Summary

Modifier and TypeMethod and Description
public <A extends Appendable> A
appendTo(A
The Appendable to which to append the string output.
appendable
)

Implements com.ibm.icu.text.FormattedValue.appendTo.

Deprecated This API is for ICU internal use only.
Not yet implemented.
public char
charAt(int
the index of the char value to be returned
index
)

Implements java.lang.CharSequence.charAt.

Deprecated This API is for ICU internal use only.
Not yet implemented.
public int
length()

Implements java.lang.CharSequence.length.

Deprecated This API is for ICU internal use only.
Not yet implemented.
public boolean
nextPosition(ConstrainedFieldPosition
The object used for iteration state. This can provide constraints to iterate over only one specific field; see ConstrainedFieldPosition#constrainField.
cfpos
)

Implements com.ibm.icu.text.FormattedValue.nextPosition.

Deprecated This API is for ICU internal use only.
Not yet implemented.
public CharSequence
subSequence(int
the start index, inclusive
start
,
int
the end index, exclusive
end
)

Implements java.lang.CharSequence.subSequence.

Deprecated This API is for ICU internal use only.
Not yet implemented.
public AttributedCharacterIterator
toCharacterIterator()

Implements com.ibm.icu.text.FormattedValue.toCharacterIterator.

Deprecated This API is for ICU internal use only.
Not yet implemented.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

FormattedMessageback to summary
public FormattedMessage()

Deprecated

This API is for ICU internal use only.

Not yet implemented.

Annotations
@Deprecated
ICU Status
Internal ICU component: 72 technology preview

Method Detail

appendToback to summary
public <A extends Appendable> A appendTo(A appendable)

Implements com.ibm.icu.text.FormattedValue.appendTo.

Doc from com.ibm.icu.text.FormattedValue.appendTo.

Deprecated

This API is for ICU internal use only.

Not yet implemented. Appends the formatted string to an Appendable.

If an IOException occurs when appending to the Appendable, an unchecked ICUUncheckedIOException is thrown instead.

Parameters
appendable:A

The Appendable to which to append the string output.

Returns:A

The same Appendable, for chaining.

Annotations
@Deprecated
@Override
ICU Status
Internal ICU component: 72 technology preview
charAtback to summary
public char charAt(int index)

Implements java.lang.CharSequence.charAt.

Doc from java.lang.CharSequence.charAt.

Deprecated

This API is for ICU internal use only.

Not yet implemented. Returns the char value at the specified index. An index ranges from zero to length() - 1. The first char value of the sequence is at index zero, the next at index one, and so on, as for array indexing.

If the char value specified by the index is a surrogate, the surrogate value is returned.

Parameters
index:int

the index of the char value to be returned

Returns:char

the specified char value

Annotations
@Deprecated
@Override
ICU Status
Internal ICU component: 72 technology preview
lengthback to summary
public int length()

Implements java.lang.CharSequence.length.

Doc from java.lang.CharSequence.length.

Deprecated

This API is for ICU internal use only.

Not yet implemented. Returns the length of this character sequence. The length is the number of 16-bit chars in the sequence.

Returns:int

the number of chars in this sequence

Annotations
@Deprecated
@Override
ICU Status
Internal ICU component: 72 technology preview
nextPositionback to summary
public boolean nextPosition(ConstrainedFieldPosition cfpos)

Implements com.ibm.icu.text.FormattedValue.nextPosition.

Doc from com.ibm.icu.text.FormattedValue.nextPosition.

Deprecated

This API is for ICU internal use only.

Not yet implemented. Iterates over field positions in the FormattedValue. This lets you determine the position of specific types of substrings, like a month or a decimal separator. To loop over all field positions:

    ConstrainedFieldPosition cfpos = new ConstrainedFieldPosition();
    while (fmtval.nextPosition(cfpos)) {
        // handle the field position; get information from cfpos
    }
Parameters
cfpos:ConstrainedFieldPosition

The object used for iteration state. This can provide constraints to iterate over only one specific field; see ConstrainedFieldPosition#constrainField.

Returns:boolean

true if a new occurrence of the field was found; false otherwise.

Annotations
@Deprecated
@Override
ICU Status
Internal ICU component: 72 technology preview
subSequenceback to summary
public CharSequence subSequence(int start, int end)

Implements java.lang.CharSequence.subSequence.

Doc from java.lang.CharSequence.subSequence.

Deprecated

This API is for ICU internal use only.

Not yet implemented. Returns a CharSequence that is a subsequence of this sequence. The subsequence starts with the char value at the specified index and ends with the char value at index end - 1. The length (in chars) of the returned sequence is end - start, so if start == end then an empty sequence is returned.

Parameters
start:int

the start index, inclusive

end:int

the end index, exclusive

Returns:CharSequence

the specified subsequence

Annotations
@Deprecated
@Override
ICU Status
Internal ICU component: 72 technology preview
toCharacterIteratorback to summary
public AttributedCharacterIterator toCharacterIterator()

Implements com.ibm.icu.text.FormattedValue.toCharacterIterator.

Doc from com.ibm.icu.text.FormattedValue.toCharacterIterator.

Deprecated

This API is for ICU internal use only.

Not yet implemented. Exports the formatted number as an AttributedCharacterIterator.

Consider using nextPosition if you are trying to get field information.

Returns:AttributedCharacterIterator

An AttributedCharacterIterator containing full field information.

Annotations
@Deprecated
@Override
ICU Status
Internal ICU component: 72 technology preview