Class Numberer_en
java.lang.Object
com.icl.saxon.number.Numberer_en
- All Implemented Interfaces:
Numberer
- Direct Known Subclasses:
Numberer_de
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidalphaDefault(int number, char formchar, StringBuffer sb) Default processing with an alphabetic format token: use the contiguous range of Unicode letters starting with that token.Format a number into a stringprotected StringtoAlpha(int number, int min, int max) Format the number as an alphabetic label using the alphabet consisting of consecutive Unicode characters from min to maxprotected StringtoAlphaSequence(int number, String alphabet) Convert the number into an alphabetic label using a given alphabet.protected StringConvert the number into a decimal or other representation using the given set of digits.protected StringtoRoman(int n) Generate a Roman numeral (in lower case)toWords(int number) Show the number as English words
-
Field Details
-
westernDigits
-
latinUpper
-
latinLower
-
greekUpper
-
greekLower
-
cyrillicUpper
-
cyrillicLower
-
hebrew
-
hiraganaA
-
katakanaA
-
hiraganaI
-
katakanaI
-
kanjiDigits
-
englishUnits
-
englishTens
-
-
Constructor Details
-
Numberer_en
public Numberer_en()
-
-
Method Details
-
format
public String format(int number, String picture, int groupSize, String groupSeparator, String letterValue) Format a number into a string- Specified by:
formatin interfaceNumberer- Parameters:
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 "")- Returns:
- the formatted number
-
alphaDefault
Default processing with an alphabetic format token: use the contiguous range of Unicode letters starting with that token. -
toAlpha
Format the number as an alphabetic label using the alphabet consisting of consecutive Unicode characters from min to max -
toAlphaSequence
-
toRadical
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. For example, if the digits are "01" the sequence is 1, 10, 11, 100, 101, 110, 111, ...- Parameters:
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.groupsize- the number of digits in each group
-
toRoman
Generate a Roman numeral (in lower case) -
toWords
Show the number as English words
-