|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.icl.saxon.number.Numberer_en
Class Numberer_en does number formatting for language="en". This supports the xsl:number element. Methods and data are declared as protected, and static is avoided, to allow easy subclassing.
Field Summary | |
protected java.lang.String |
cyrillicLower
|
protected java.lang.String |
cyrillicUpper
|
protected java.lang.String[] |
englishTens
|
protected java.lang.String[] |
englishUnits
|
protected java.lang.String |
greekLower
|
protected java.lang.String |
greekUpper
|
protected java.lang.String |
hebrew
|
protected java.lang.String |
hiraganaA
|
protected java.lang.String |
hiraganaI
|
protected java.lang.String |
kanjiDigits
|
protected java.lang.String |
katakanaA
|
protected java.lang.String |
katakanaI
|
protected java.lang.String |
latinLower
|
protected java.lang.String |
latinUpper
|
protected java.lang.String |
westernDigits
|
Constructor Summary | |
Numberer_en()
|
Method Summary | |
protected void |
alphaDefault(int number,
char formchar,
java.lang.StringBuffer sb)
Default processing with an alphabetic format token: use the contiguous range of Unicode letters starting with that token. |
java.lang.String |
format(int number,
java.lang.String picture,
int groupSize,
java.lang.String groupSeparator,
java.lang.String letterValue)
Format a number into a string |
protected java.lang.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 java.lang.String |
toAlphaSequence(int number,
java.lang.String alphabet)
Convert the number into an alphabetic label using a given alphabet. |
protected java.lang.String |
toRadical(int number,
java.lang.String digits,
java.lang.String picture,
int groupSize,
java.lang.String groupSeparator)
Convert the number into a decimal or other representation using the given set of digits. |
protected java.lang.String |
toRoman(int n)
Generate a Roman numeral (in lower case) |
java.lang.String |
toWords(int number)
Show the number as English words |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.String westernDigits
protected java.lang.String latinUpper
protected java.lang.String latinLower
protected java.lang.String greekUpper
protected java.lang.String greekLower
protected java.lang.String cyrillicUpper
protected java.lang.String cyrillicLower
protected java.lang.String hebrew
protected java.lang.String hiraganaA
protected java.lang.String katakanaA
protected java.lang.String hiraganaI
protected java.lang.String katakanaI
protected java.lang.String kanjiDigits
protected java.lang.String[] englishUnits
protected java.lang.String[] englishTens
Constructor Detail |
public Numberer_en()
Method Detail |
public java.lang.String format(int number, java.lang.String picture, int groupSize, java.lang.String groupSeparator, java.lang.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, java.lang.StringBuffer sb)
protected java.lang.String toAlpha(int number, int min, int max)
protected java.lang.String toAlphaSequence(int number, java.lang.String alphabet)
protected java.lang.String toRadical(int number, java.lang.String digits, java.lang.String picture, int groupSize, java.lang.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 placesgroupSeparator
- the separator to use between groups of digits.protected java.lang.String toRoman(int n)
public java.lang.String toWords(int number)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |