Class 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
    • 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 class MeasureFormat
        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 class MeasureFormat
        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