net.sf.saxon.expr.number

## Class NumericGroupFormatter

- java.lang.Object
- - net.sf.saxon.expr.number.NumericGroupFormatter

- All Implemented Interfaces:
    Serializable
  Direct Known Subclasses:
    IrregularGroupFormatter, RegularGroupFormatter

      public abstract class NumericGroupFormatter
      extends Object
      implements 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 and Description
    --- | ---
    `protected UnicodeString` | `adjustedPicture`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `NumericGroupFormatter()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract String` | `format(FastStringBuffer value)` Reformat a number to add grouping separators
    `UnicodeString` | `getAdjustedPicture()` Get the adjusted (preprocessed) picture
    `abstract String` | `getSeparator()` Get the grouping separator to be used, as a Unicode codepoint.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### adjustedPicture

          protected UnicodeString adjustedPicture

  - ### Constructor Detail

    - #### NumericGroupFormatter

          public NumericGroupFormatter()

  - ### Method Detail

    - #### getAdjustedPicture

          public UnicodeString getAdjustedPicture()

      Get the adjusted (preprocessed) picture
      Returns:
        the adjusted picture

    - #### format

          public abstract 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 String getSeparator()

      Get the grouping separator to be used, as a Unicode codepoint. If more than one is used, return the last. If no grouping separators are used, return null
      Returns:
        the grouping separator

Copyright (c) 2004-2013 Saxonica Limited. All rights reserved.