com.icl.saxon.number
Class NumberFormatter
public class NumberFormatter
Class NumberFormatter defines a method to format a Vector of integers as a character
string according to a supplied format specification.
String | format(Vector numbers, int groupSize, String groupSeparator, String letterValue, Numberer numberer) - Format a vector of numbers.
|
String | format(int number, int groupSize, String groupSeparator, String letterValue, Numberer numberer) - Format a single number.
|
void | prepare(String format) - Prepare the format pattern.
|
format
public String format(Vector numbers,
int groupSize,
String groupSeparator,
String letterValue,
Numberer numberer)
Format a vector of numbers.
numbers
- the numbers to be formatted (a sequence of integer values)
- the formatted output string.
format
public String format(int number,
int groupSize,
String groupSeparator,
String letterValue,
Numberer numberer)
Format a single number. The format/template has the same syntax as for a Vector
of numbers.
prepare
public void prepare(String format)
Prepare the format pattern.
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.