com.oberon.util
Class Numberer_en
java.lang.Object
com.oberon.util.Numberer_en
- All Implemented Interfaces:
- Numberer
public class Numberer_en
- extends java.lang.Object
- implements Numberer
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.
- Version:
- 4 August 2000
Method Summary |
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 |
java.lang.String |
toWords(int number)
Show the number as English words |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Numberer_en
public Numberer_en()
format
public 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
- Specified by:
format
in interface Numberer
- 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
toWords
public java.lang.String toWords(int number)
- Show the number as English words
Copyright © 2008-2014 Mirko Solazzi. All Rights Reserved.