net.sf.saxon.expr.number

## Class IrregularGroupFormatter

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

- All Implemented Interfaces:
    Serializable

      public class IrregularGroupFormatter
      extends NumericGroupFormatter

  Handles grouping separators when formatting a number in cases where the grouping separators are not at regular intervals
  See Also:
    Serialized Form

- - ### Field Summary

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

      `adjustedPicture`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `IrregularGroupFormatter(IntSet groupingPositions, List<Integer> sep, UnicodeString adjustedPicture)` Create a formatter for numbers where the grouping separators occur at irregular positions

  - ### 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

    - #### IrregularGroupFormatter

          public IrregularGroupFormatter(IntSet groupingPositions,
                                 List<Integer> sep,
                                 UnicodeString adjustedPicture)

      Create a formatter for numbers where the grouping separators occur at irregular positions
      Parameters:
        `groupingPositions` - the positions where the separators are to be inserted
        `sep` - array holding the separators to be inserted, as Unicode codepoints, in order starting with the right-most
        `adjustedPicture` -

  - ### 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. If more than one is used, return the last. If no grouping separators are used, return null
      Specified by:
        `getSeparator` in class `NumericGroupFormatter`
      Returns:
        the grouping separator

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