|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectealet.EthiopicNumber
public class EthiopicNumber
The Ethiopic numbering system is different from the Hindu-Arabic (modern) system. The system consists of 20 digits, but not 0, thus counting begins from 1. The Ethiopic numerals in modern form are (1, 2, 3, 4, 5, 6, ,7, 8, 9, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 10000).
Briefly, these are the set of rules for writing Ethiopic numbers. Assume they are strictly based on integer (whole) numbers.
| Constructor Summary | |
|---|---|
EthiopicNumber()
Instance with hashtable with Ethiopic digits and their equivalents |
|
| Method Summary | |
|---|---|
java.lang.String |
ethiopicUnicode(long modern)
Returns Ethiopic number in Unicode form (2 bytes) |
java.lang.String |
ethiopicUTF(long modern)
Returns Ethiopic number in UTF-8 |
char |
getEthiopic(long num)
Maps modern number to Ethiopic digit and returns the result |
int |
getModern(char c)
Maps the Ethiopic digit in modern and returns the result |
void |
toEthiopic(long x)
Converets a Hindu-Arabic numerals to Ethiopic numerals and stores the result into an array. |
long |
toModern(java.lang.String ethiopic)
Converts Ethiopic number to modern or Hindu-Arabic number and returns the result. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EthiopicNumber()
| Method Detail |
|---|
public int getModern(char c)
c - The Ethiopic digit to be mapped to modern
public char getEthiopic(long num)
num - The Ethiopic digit to be mapped to modern
public java.lang.String ethiopicUnicode(long modern)
modern - A number in modern to be converted to Ethiopic
public java.lang.String ethiopicUTF(long modern)
modern - A number in modern to be converted to Ethiopic
public void toEthiopic(long x)
x - Hindu-Arabic numeral to be convertedpublic long toModern(java.lang.String ethiopic)
Unicode : 0x1370 0x137C 0x1372 0x1371 0x137B 0xu137A 0x1371
Decimal : 2 10000 10 9 100 90 9
Operations : 2 * 10000 +(10 + 9) * 100 + 90 + 9
Result : 21999
ethiopic - Ethiopic number in String form
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||