de.jostnet.ZahlAlsWort.Einer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zahlalswort Show documentation
Show all versions of zahlalswort Show documentation
ZahlAlsWort - Library to convert Numbers to Words
package de.jostnet.ZahlAlsWort;
/**********************************************************************
* Copyright (c) by Heiner Jostkleigrewe
*
* [email protected]
**********************************************************************/
class Einer
{
static String get(Zahl zahl)
{
switch (zahl.getEinerStelle())
{
case 0:
return "null";
case 1:
return "eins";
case 2:
return "zwei";
case 3:
return "drei";
case 4:
return "vier";
case 5:
return "fünf";
case 6:
return "sechs";
case 7:
return "sieben";
case 8:
return "acht";
case 9:
return "neun";
}
return "ungültige Zahl:" + zahl;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy