Top Description Fields Constructors Methods
com.ibm.icu.text

pack-priv Class CurrencyFormat

extends MeasureFormat
Class Inheritance
Imports
java.io.ObjectStreamException, java.text.FieldPosition, .ParsePosition, com.ibm.icu.util.CurrencyAmount, .ULocale

Temporary internal concrete subclass of MeasureFormat implementing parsing and formatting of CurrencyAmount objects. This class is likely to be redesigned and rewritten in the near future.

This class currently delegates to DecimalFormat for parsing and formatting.

Author
Alan Liu
See Also
com.ibm.icu.text.UFormat, com.ibm.icu.text.DecimalFormat

Field Summary

Modifier and TypeField and Description
pack-priv static final long
Inherited from com.ibm.icu.text.MeasureFormat:
NUMBER_FORMATTER_CURRENCYNUMBER_FORMATTER_INTEGERNUMBER_FORMATTER_STANDARD

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public StringBuffer
format(Object
must be a Collection<? extends Measure>, Measure[], or Measure object.
obj
,
StringBuffer
Formatted string appended here.
toAppendTo
,
FieldPosition
Identifies a field in the formatted text.
pos
)

Overrides com.ibm.icu.text.MeasureFormat.format.

Override Format.format().
public CurrencyAmount
parseObject(String
A String, part of which should be parsed.
source
,
ParsePosition
A ParsePosition object with index and error index information as described above.
pos
)

Overrides com.ibm.icu.text.MeasureFormat.parseObject.

Override Format.parseObject().
private Object
private Object
Inherited from com.ibm.icu.text.MeasureFormat:
clearCacheequalsformatMeasurePerUnitformatMeasuresformatMeasuresgetCurrencyFormatgetCurrencyFormatgetCurrencyFormatgetInstancegetInstancegetInstancegetInstancegetLocalegetNumberFormatgetNumberFormatInternalgetNumberFormattergetRangeFormatgetUnitDisplayNamegetWidthhashCodetoCurrencyProxytoTimeUnitProxywithLocalewithNumberFormat

Field Detail

serialVersionUIDback to summary
pack-priv static final long serialVersionUID

Hides com.ibm.icu.text.MeasureFormat.serialVersionUID.

Constructor Detail

CurrencyFormatback to summary
public CurrencyFormat(ULocale locale)

Method Detail

formatback to summary
public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos)

Overrides com.ibm.icu.text.MeasureFormat.format.

Override Format.format().

Parameters
obj:Object

Doc from com.ibm.icu.text.MeasureFormat.format.

must be a Collection<? extends Measure>, Measure[], or Measure object.

toAppendTo:StringBuffer

Doc from com.ibm.icu.text.MeasureFormat.format.

Formatted string appended here.

pos:FieldPosition

Doc from com.ibm.icu.text.MeasureFormat.format.

Identifies a field in the formatted text.

Returns:StringBuffer

Doc from java.text.Format.format.

the string buffer passed in as toAppendTo, with formatted text appended

Annotations
@Override
See Also
java.text.Format#format(java.lang.Object, java.lang.StringBuffer, java.text.FieldPosition)
parseObjectback to summary
public CurrencyAmount parseObject(String source, ParsePosition pos)

Overrides com.ibm.icu.text.MeasureFormat.parseObject.

Override Format.parseObject().

Parameters
source:String

Doc from java.text.Format.parseObject.

A String, part of which should be parsed.

pos:ParsePosition

Doc from java.text.Format.parseObject.

A ParsePosition object with index and error index information as described above.

Returns:CurrencyAmount

Doc from java.text.Format.parseObject.

An Object parsed from the string. In case of error, returns null.

Annotations
@Override
See Also
java.text.Format#parseObject(java.lang.String, java.text.ParsePosition)
readResolveback to summary
private Object readResolve() throws ObjectStreamException
writeReplaceback to summary
private Object writeReplace() throws ObjectStreamException

Hides com.ibm.icu.text.MeasureFormat.writeReplace.