|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.efaps.number2words.converters.AbstractDecimalConverter
org.efaps.number2words.converters.German
public class German
The class implements the conversion of numbers to German words.
| Constructor Summary | |
|---|---|
German()
|
|
| Method Summary | |
|---|---|
protected java.lang.String |
convertLessThanOneHundred(int _number)
Converts number less than one hundred into German words. |
protected java.lang.String |
convertPower(int _number,
int _power)
The method converts the given _number depending on the
_power to words. |
protected java.lang.String |
getMinus()
Returns the related German word for "minus" needed for negative numbers. |
protected java.lang.String[] |
getNumNames()
Returns the string array to define the conversion of numbers for 1 till 19. |
protected java.lang.String[] |
getPowerNames()
Returns the string array for log numbers 100, 1 000, 1 000 000 and 1 000 000 000. |
protected java.lang.String[] |
getTensNames()
Returns the string array for the numbers 10, 20, 30, 40, 50, 60, 70, 80 and 90. |
protected java.lang.String |
getZero()
Returns the related English word for the number zero ('0'). |
| Methods inherited from class org.efaps.number2words.converters.AbstractDecimalConverter |
|---|
convert, convertLessThanOneThousand, isDecimal, usesShortScale |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public German()
| Method Detail |
|---|
protected java.lang.String convertLessThanOneHundred(int _number)
Converts number less than one hundred into German words. The original method was override because in German language the convert is done using first the last digit (one, two, ...) and then the 'ten' digit (twenty, thirty, ...) concatenated by an 'and'.
Examples:
convertLessThanOneHundred in class AbstractDecimalConverter_number - number less than one hundred to convert to German words
_number
protected java.lang.String convertPower(int _number,
int _power)
_number depending on the
_power to words. The real number to convert is
"_number * (10 ^ _power)". The original method is
overwritten because if _number is equal one, the values
from SINGLE_POWER_NAMES must be used.
convertPower in class AbstractDecimalConverter_number - number to convert_power - power of the number
SINGLE_POWER_NAMESprotected java.lang.String[] getNumNames()
getNumNames in class AbstractDecimalConverterAbstractDecimalConverter.getNumNames(),
NUM_NAMESprotected java.lang.String[] getTensNames()
getTensNames in class AbstractDecimalConverterAbstractDecimalConverter.getTensNames(),
TENS_NAMESprotected java.lang.String[] getPowerNames()
getPowerNames in class AbstractDecimalConverterAbstractDecimalConverter.getPowerNames(),
#LOG_NAMESprotected java.lang.String getZero()
getZero in class AbstractDecimalConverterprotected java.lang.String getMinus()
getMinus in class AbstractDecimalConverter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||