Class NumericGroupFormatter

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    IrregularGroupFormatter, RegularGroupFormatter

    public abstract class NumericGroupFormatter
    extends java.lang.Object
    implements java.io.Serializable
    A NumericGroupFormatter is responsible for insertion of grouping separators into a formatted number (for example, reformatting "1234" as "1,234").
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String adjustedPicture  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract java.lang.String format​(FastStringBuffer value)
      Reformat a number to add grouping separators
      java.lang.String getAdjustedPicture()
      Get the adjusted (preprocessed) picture
      abstract java.lang.String getSeparator()
      Get the grouping separator to be used.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • adjustedPicture

        protected java.lang.String adjustedPicture
    • Constructor Detail

      • NumericGroupFormatter

        public NumericGroupFormatter()
    • Method Detail

      • getAdjustedPicture

        public java.lang.String getAdjustedPicture()
        Get the adjusted (preprocessed) picture
      • format

        public abstract java.lang.String format​(FastStringBuffer value)
        Reformat a number to add grouping separators
        Parameters:
        value - a buffer holding the number to be reformatted
        Returns:
        the reformatted number
      • getSeparator

        public abstract java.lang.String getSeparator()
        Get the grouping separator to be used. If more than one is used, return the last. If no grouping separators are used, return null
        Returns:
        the grouping separator