Package com.ibm.icu.text
Class CurrencyFormat
- java.lang.Object
-
- java.text.Format
-
- com.ibm.icu.text.UFormat
-
- com.ibm.icu.text.MeasureFormat
-
- com.ibm.icu.text.CurrencyFormat
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
class CurrencyFormat extends MeasureFormat
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.
- See Also:
UFormat
,DecimalFormat
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.ibm.icu.text.MeasureFormat
MeasureFormat.FormatWidth, MeasureFormat.MeasureProxy, MeasureFormat.NumberFormatterCacheEntry, MeasureFormat.NumericFormatters
-
Nested classes/interfaces inherited from class com.ibm.icu.text.UFormat
UFormat.SpanField
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static long
serialVersionUID
-
Fields inherited from class com.ibm.icu.text.MeasureFormat
NUMBER_FORMATTER_CURRENCY, NUMBER_FORMATTER_INTEGER, NUMBER_FORMATTER_STANDARD
-
-
Constructor Summary
Constructors Constructor Description CurrencyFormat(ULocale locale)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringBuffer
format(java.lang.Object obj, java.lang.StringBuffer toAppendTo, java.text.FieldPosition pos)
Override Format.format().CurrencyAmount
parseObject(java.lang.String source, java.text.ParsePosition pos)
Override Format.parseObject().private java.lang.Object
readResolve()
private java.lang.Object
writeReplace()
-
Methods inherited from class com.ibm.icu.text.MeasureFormat
clearCache, equals, formatMeasurePerUnit, formatMeasures, formatMeasures, getCurrencyFormat, getCurrencyFormat, getCurrencyFormat, getInstance, getInstance, getInstance, getInstance, getLocale, getNumberFormat, getNumberFormatInternal, getNumberFormatter, getRangeFormat, getUnitDisplayName, getWidth, hashCode, toCurrencyProxy, toTimeUnitProxy, withLocale, withNumberFormat
-
-
-
-
Field Detail
-
serialVersionUID
static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CurrencyFormat
public CurrencyFormat(ULocale locale)
-
-
Method Detail
-
format
public java.lang.StringBuffer format(java.lang.Object obj, java.lang.StringBuffer toAppendTo, java.text.FieldPosition pos)
Override Format.format().- Overrides:
format
in classMeasureFormat
- Parameters:
obj
- must be a Collection<? extends Measure>, Measure[], or Measure object.toAppendTo
- Formatted string appended here.pos
- Identifies a field in the formatted text.- See Also:
Format.format(java.lang.Object, java.lang.StringBuffer, java.text.FieldPosition)
-
parseObject
public CurrencyAmount parseObject(java.lang.String source, java.text.ParsePosition pos)
Override Format.parseObject().- Overrides:
parseObject
in classMeasureFormat
- See Also:
Format.parseObject(java.lang.String, java.text.ParsePosition)
-
writeReplace
private java.lang.Object writeReplace() throws java.io.ObjectStreamException
- Throws:
java.io.ObjectStreamException
-
readResolve
private java.lang.Object readResolve() throws java.io.ObjectStreamException
- Throws:
java.io.ObjectStreamException
-
-