|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectplatypus.CommandId
public class CommandId
All supported commands are placed in a tree, where each node consists of the command string and a command identifier, which will be used to call the right routine. Used by the Command class.
| Field Summary | |
|---|---|
(package private) java.util.TreeMap<java.lang.String,java.lang.Integer> |
commands
a tree consisting of the command lexemes and the associated token types |
| Constructor Summary | |
|---|---|
CommandId()
|
|
| Method Summary | |
|---|---|
int |
FTOgetCommandCount()
Returns the number of commands in the command tree. |
java.util.TreeMap<java.lang.String,java.lang.Integer> |
FTOgetCommands()
For testing only (FTO). |
int |
get(java.lang.String key)
Returns the type of the command based on looking up the command lexeme |
private void |
loadCommands()
Loads all the supported commands into the CommandID tree. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
final java.util.TreeMap<java.lang.String,java.lang.Integer> commands
| Constructor Detail |
|---|
public CommandId()
| Method Detail |
|---|
private void loadCommands()
public int get(java.lang.String key)
key - command lexeme to look up
public int FTOgetCommandCount()
public java.util.TreeMap<java.lang.String,java.lang.Integer> FTOgetCommands()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||