Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.sf.saxon.number
Class NumberFormatter

    java.lang.Object
      net.sf.saxon.number.NumberFormatter

All Implemented Interfaces:
  java.io.Serializable

public class NumberFormatter
extends java.lang.Object
implements java.io.Serializable

Class NumberFormatter defines a method to format a ArrayList of integers as a character string according to a supplied format specification.

See Also:
  Serialized Form

Constructor Summary
`NumberFormatter()`

Method Summary
`java.lang.CharSequence` | `format(java.util.List numbers, int groupSize, java.lang.String groupSeparator, java.lang.String letterValue, java.lang.String ordinal, Numberer numberer)` Format a list of numbers.
`void` | `prepare(java.lang.String format)` Tokenize the format pattern.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### NumberFormatter

    public NumberFormatter()

Method Detail

### prepare

    public void prepare(java.lang.String format)

  Tokenize the format pattern.

  Parameters:
    `format` - the format specification. Contains one of the following values:
    - "1": conventional decimal numbering
    - "a": sequence a, b, c, ... aa, ab, ac, ...
    - "A": sequence A, B, C, ... AA, AB, AC, ...
    - "i": sequence i, ii, iii, iv, v ...
    - "I": sequence I, II, III, IV, V, ...
    This symbol may be preceded and followed by punctuation (any other characters) which is copied to the output string.

### format

    public java.lang.CharSequence format(java.util.List numbers,
                                         int groupSize,
                                         java.lang.String groupSeparator,
                                         java.lang.String letterValue,
                                         java.lang.String ordinal,
                                         Numberer numberer)

  Format a list of numbers.

  Parameters:
    `numbers` - the numbers to be formatted (a sequence of integer values; it may also contain preformatted strings as part of the error recovery fallback)
  Returns:
    the formatted output string.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD