net.sf.saxon.expr.number

## Class RegularGroupFormatter

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

- All Implemented Interfaces:
    Serializable

      public class RegularGroupFormatter
      extends NumericGroupFormatter

  A RegularGroupFormatter is a NumericGroupFormatter that inserts a separator at constant intervals through a number: for example, a comma after every three digits counting from the right.
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class net.sf.saxon.expr.number.NumericGroupFormatter

      `adjustedPicture`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RegularGroupFormatter(int grpSize, String grpSep, UnicodeString adjustedPicture)` Create a RegularGroupFormatter

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `format(FastStringBuffer value)` Reformat a number to add grouping separators
    `String` | `getSeparator()` Get the grouping separator to be used

    - ### Methods inherited from class net.sf.saxon.expr.number.NumericGroupFormatter

      `getAdjustedPicture`

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

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

- - ### Constructor Detail

    - #### RegularGroupFormatter

          public RegularGroupFormatter(int grpSize,
                               String grpSep,
                               UnicodeString adjustedPicture)

      Create a RegularGroupFormatter
      Parameters:
        `grpSize` - the grouping size. If zero, no grouping separators are inserted
        `grpSep` - the grouping separator (normally but not necessarily a single character)
        `adjustedPicture` - The picture, adjusted to conform to the rules of the xsl:number function, which means the picture supplied to format-integer minus any modifiers, and minus grouping separators and optional-digit signs

  - ### Method Detail

    - #### format

          public String format(FastStringBuffer value)

      Description copied from class: `NumericGroupFormatter`
      Reformat a number to add grouping separators
      Specified by:
        `format` in class `NumericGroupFormatter`
      Parameters:
        `value` - a buffer holding the number to be reformatted
      Returns:
        the reformatted number

    - #### getSeparator

          public String getSeparator()

      Get the grouping separator to be used
      Specified by:
        `getSeparator` in class `NumericGroupFormatter`
      Returns:
        the grouping separator

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