public class NumberFormatter
extends java.lang.Object
Constructor and Description |
---|
NumberFormatter() |
Modifier and Type | Method and Description |
---|---|
UnicodeString |
format(java.util.List<java.lang.Object> numbers,
int groupSize,
java.lang.String groupSeparator,
java.lang.String letterValue,
java.lang.String ordinal,
Numberer numberer)
Format a list of numbers.
|
static boolean |
isLetterOrDigit(int c)
Determine whether a (possibly non-BMP) character is a letter or digit.
|
void |
prepare(java.lang.String format)
Tokenize the format pattern.
|
public void prepare(java.lang.String format)
format
- the format specification. Contains one of the following values:public static boolean isLetterOrDigit(int c)
c
- the codepoint of the character to be testedpublic UnicodeString format(java.util.List<java.lang.Object> numbers, int groupSize, java.lang.String groupSeparator, java.lang.String letterValue, java.lang.String ordinal, Numberer numberer)
numbers
- the numbers to be formatted (a sequence of integer values; it may also contain
preformatted strings as part of the error recovery fallback)groupSize
- the grouping-size, as in xsl:numbergroupSeparator
- the grouping-separator, as in xsl:numberletterValue
- the letter-value, as in xsl:numberordinal
- the ordinal attribute as in xsl:numbernumberer
- the Numberer to be used for localizationCopyright (c) 2004-2022 Saxonica Limited. All rights reserved.