net.sf.saxon.trans

## Class DecimalFormatManager

- java.lang.Object
- - net.sf.saxon.trans.DecimalFormatManager

- All Implemented Interfaces:
    Serializable

      public class DecimalFormatManager
      extends Object
      implements Serializable

  DecimalFormatManager manages the collection of named and unnamed decimal formats, for use by the format-number() function.

  In XSLT, there is a single set of decimal formats shared by the whole stylesheet. In XQuery 3.0, however, each query module has its own set of decimal formats. The DecimalFormatManager to use is therefore linked from the format-number() call on the expression tree.

  Author:
    Michael H. Kay
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DecimalFormatManager()` create a DecimalFormatManager and initialise variables

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `checkConsistency()` Check the consistency of all DecimalSymbols objects owned by this DecimalFormatManager
    `DecimalSymbols` | `getDefaultDecimalFormat()` Get the default decimal-format.
    `DecimalSymbols` | `getNamedDecimalFormat(StructuredQName qName)` Get a named decimal-format registered using setNamedDecimalFormat
    `DecimalSymbols` | `obtainNamedDecimalFormat(StructuredQName qName)` Get a named decimal-format registered using setNamedDecimalFormat if it exists; create it if it does not

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

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

- - ### Constructor Detail

    - #### DecimalFormatManager

          public DecimalFormatManager()

      create a DecimalFormatManager and initialise variables

  - ### Method Detail

    - #### getDefaultDecimalFormat

          public DecimalSymbols getDefaultDecimalFormat()

      Get the default decimal-format.
      Returns:
        the default (unnamed) decimal format

    - #### getNamedDecimalFormat

          public DecimalSymbols getNamedDecimalFormat(StructuredQName qName)

      Get a named decimal-format registered using setNamedDecimalFormat
      Parameters:
        `qName` - The name of the decimal format
      Returns:
        the DecimalSymbols object corresponding to the given name, if any or null if not set.

    - #### obtainNamedDecimalFormat

          public DecimalSymbols obtainNamedDecimalFormat(StructuredQName qName)

      Get a named decimal-format registered using setNamedDecimalFormat if it exists; create it if it does not
      Parameters:
        `qName` - The name of the decimal format
      Returns:
        the DecimalSymbols object corresponding to the given name, if it exists, or a newly created DecimalSymbols object otherwise

    - #### checkConsistency

          public void checkConsistency()
                                throws XPathException

      Check the consistency of all DecimalSymbols objects owned by this DecimalFormatManager
      Throws:
        `XPathException` - if any inconsistencies are found

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