com.icl.saxon.number
public class Numberer_en extends Object implements Numberer
Modifier and Type | Field and Description |
---|---|
protected String |
cyrillicLower |
protected String |
cyrillicUpper |
protected String[] |
englishTens |
protected String[] |
englishUnits |
protected String |
greekLower |
protected String |
greekUpper |
protected String |
hebrew |
protected String |
hiraganaA |
protected String |
hiraganaI |
protected String |
kanjiDigits |
protected String |
katakanaA |
protected String |
katakanaI |
protected String |
latinLower |
protected String |
latinUpper |
protected String |
westernDigits |
Constructor and Description |
---|
Numberer_en() |
Modifier and Type | Method and Description |
---|---|
protected void |
alphaDefault(int number,
char formchar,
StringBuffer sb)
Default processing with an alphabetic format token: use the contiguous
range of Unicode letters starting with that token.
|
String |
format(int number,
String picture,
int groupSize,
String groupSeparator,
String letterValue)
Format a number into a string
|
protected String |
toAlpha(int number,
int min,
int max)
Format the number as an alphabetic label using the alphabet consisting
of consecutive Unicode characters from min to max
|
protected String |
toAlphaSequence(int number,
String alphabet)
Convert the number into an alphabetic label using a given alphabet.
|
protected String |
toRadical(int number,
String digits,
String picture,
int groupSize,
String groupSeparator)
Convert the number into a decimal or other representation using the given set of
digits.
|
protected String |
toRoman(int n)
Generate a Roman numeral (in lower case)
|
String |
toWords(int number)
Show the number as English words
|
protected String westernDigits
protected String latinUpper
protected String latinLower
protected String greekUpper
protected String greekLower
protected String cyrillicUpper
protected String cyrillicLower
protected String hebrew
protected String hiraganaA
protected String katakanaA
protected String hiraganaI
protected String katakanaI
protected String kanjiDigits
protected String[] englishUnits
protected String[] englishTens
public String format(int number, String picture, int groupSize, String groupSeparator, String letterValue)
format
in interface Numberer
number
- The number to be formattedpicture
- The format specification. This is a single component of the format attribute
of xsl:number, e.g. "1", "01", "i", or "a"groupSize
- number of digits per group (0 implies no grouping)groupSeparator
- string to appear between groups of digitsletterValue
- as defined in xsl:number ("alphabetic" or "traditional" or "")protected void alphaDefault(int number, char formchar, StringBuffer sb)
protected String toAlpha(int number, int min, int max)
protected String toAlphaSequence(int number, String alphabet)
protected String toRadical(int number, String digits, String picture, int groupSize, String groupSeparator)
number
- the number to be formatteddigits
- the set of digits to be usedpicture
- the formatting token, e.g. 001 means include leading zeroes to give at least
three decimal placesgroupsize
- the number of digits in each groupgroupSeparator
- the separator to use between groups of digits.protected String toRoman(int n)
public String toWords(int number)