net.sf.saxon.number

Class NumberFormatter

public class NumberFormatter extends Object implements Serializable

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

Author: Michael H. Kay

Method Summary
CharSequenceformat(List numbers, int groupSize, String groupSeparator, String letterValue, String ordinal, Numberer numberer)
Format a list of numbers.
voidprepare(String format)
Tokenize the format pattern.

Method Detail

format

public CharSequence format(List numbers, int groupSize, String groupSeparator, String letterValue, 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.

prepare

public void prepare(String format)
Tokenize the format pattern.

Parameters: format the format specification. Contains one of the following values:

This symbol may be preceded and followed by punctuation (any other characters) which is copied to the output string.