|
QJCC homepage | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object biz.chitec.quarterback.gjsa.ChatSymbolHolder biz.chitec.quarterback.gjsa.DynamicChatSymbolHolder
Dynamic version of a CharSymbolHolder. Can be loaded with number/symbols pairs at runtime. Note that this is not the usual way of defining a ChatSymbolHolder. Normally, they will be defined through a preprocessor so that they contain a list of int constants which can be used in case-clauses. This one is nice for small demo projects or similar applications where the preprocessor overhead would be too complicated.
Field Summary | |
private java.util.Map |
byint
|
private java.util.Map |
bystring
|
private java.lang.String |
symbolsetname
|
Constructor Summary | |
DynamicChatSymbolHolder(java.lang.String ssnx)
Initialized the holder with a name. |
Method Summary | |
void |
addSymbol(int ival,
java.lang.String sval)
Adds a int-String pair as content. |
java.lang.String |
getSymbolSetName()
Return the name of the symbol set. |
int[] |
getSymbolSetVersion()
Version of the symbol set in version-subversion-patchlevel type. |
java.lang.String |
numericToSymbol(int numeric)
Return the string-based representation of the symbol. |
int |
symbolToNumeric(java.lang.String symbol)
Return the numeric equivalent to a symbol given as String. |
Methods inherited from class biz.chitec.quarterback.gjsa.ChatSymbolHolder |
anyToNumeric, equals, getAllSymbols, getAllSymbolsQIA, getSymbolSetVersionV |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.lang.String symbolsetname
private java.util.Map byint
private java.util.Map bystring
Constructor Detail |
public DynamicChatSymbolHolder(java.lang.String ssnx)
Method Detail |
public void addSymbol(int ival, java.lang.String sval)
ival
- The int valuesval
- The symbolic value as a Stringpublic int symbolToNumeric(java.lang.String symbol)
ChatSymbolHolder
symbolToNumeric
in class ChatSymbolHolder
symbol
- Value of the symbol as String
public java.lang.String numericToSymbol(int numeric)
ChatSymbolHolder
numericToSymbol
in class ChatSymbolHolder
numeric
- The symbol's integer value.
public java.lang.String getSymbolSetName()
ChatSymbolHolder
getSymbolSetName
in class ChatSymbolHolder
public int[] getSymbolSetVersion()
ChatSymbolHolder
getSymbolSetVersion
in class ChatSymbolHolder
|
QJCC homepage | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |