|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.thdl.tib.text.DuffCode
A wrapper for the primitive data types that combine to represent a Tibetan glyph in the TibetanMachineWeb family of fonts. A DuffCode consists of a font number, a character, and a character number. A font identification and a character (or character number) are sufficient to uniquely identify any TibetanMachineWeb glyph.
Field Summary | |
char |
character
the character value of this glyph |
int |
charNum
the character value of this glyph, as an integer |
int |
fontNum
the font number in which this glyph can be found, from 1 (TibetanMachineWeb) to 10 (TibetanMachineWeb9). |
Constructor Summary | |
DuffCode(int font,
char ch)
Called to create DuffCodes on the fly from an identifying font number and an ASCII character. |
|
DuffCode(String s,
boolean leftToRight)
Called by TibetanMachineWeb to generate
DuffCodes from the 'tibwn.ini' initialization file. |
Method Summary | |
boolean |
equals(Object o)
Evaluates two DuffCodes as equal iff their font numbers and characters are identical. |
char |
getCharacter()
Gets the character for this glyph. |
int |
getCharNum()
Gets the character for this glyph, as an integer. |
int |
getFontNum()
Gets the font number of this glyph. |
int |
hashCode()
Assigns a hashcode based on the font number and character for this glyph. |
String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public int fontNum
public char character
public int charNum
Constructor Detail |
public DuffCode(String s, boolean leftToRight)
TibetanMachineWeb
to generate
DuffCodes from the 'tibwn.ini' initialization file.
This constructor expects to receive a string such as "1,33" or "33,1",
i.e. a sequence of two numbers separated by a comma. These numbers
represent a character: one number is its identifying font number,
and the other is the ASCII code of the character.
s
- the string to parseleftToRight
- should be true if the first number is the font number,
false if the second number is the font numberpublic DuffCode(int font, char ch)
font
- the identifying number of the fontch
- a characterMethod Detail |
public int getFontNum()
public int getCharNum()
public char getCharacter()
public int hashCode()
hashCode
in class Object
public boolean equals(Object o)
equals
in class Object
o
- the object (DuffCode) you want to compare
public String toString()
toString
in class Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |