|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xnap.plugin.gift.net.lexer.Command
public class Command
Command Represents a GiFT-Command
| Constructor Summary | |
|---|---|
Command()
Creates an empty Command object. |
|
Command(java.lang.String cmd)
Creates a new cmd-Command object. |
|
| Method Summary | |
|---|---|
void |
addKey(java.lang.String key)
Adds a key without its argument |
void |
addKey(java.lang.String key,
java.lang.String arg)
Adds a key with its argument |
void |
addSubCommand(Command command)
Adds a subcommand |
java.util.Vector |
getAllSubCommandsByName(java.lang.String key)
Method getAllSubCommandsByName. |
java.lang.String |
getCommand()
returns the command |
java.lang.String |
getCommandArgument()
Returns the commands argument |
java.lang.String |
getCommandModifier()
Returns the commands modifier |
java.lang.String |
getKey(java.lang.String key)
Returns the argument corresponding to the given key |
java.lang.String |
getKeyModifier(java.lang.String key)
Returns the modifier for the given key. |
java.util.Enumeration |
getKeys()
Returns all keys |
Command |
getSubCommandByName(java.lang.String key)
Returns the subcommand by its name If more subcommands with the same name exists, the first will be returned |
java.util.Vector |
getSubCommands()
Returns all subcommands (its names) |
boolean |
hasKeys()
Returns if command has keys |
boolean |
parse(java.lang.String cmd)
Parses the command from a String (GiFT-UI-protocol) |
java.lang.String |
print()
Returns the command as String (GiFT-UI-protocol) |
void |
setCommandArgument(java.lang.String arg)
Sets the commands argument |
void |
setCommandModifier(java.lang.String arg)
Sets the modifier for the command |
void |
setKeyArgument(java.lang.String key,
java.lang.String arg)
Sets the argument for the given key |
void |
setKeyModifier(java.lang.String key,
java.lang.String mod)
Sets the modifier for the specified key. |
java.lang.String |
toString()
Debugdump |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Command(java.lang.String cmd)
cmd-Command object.
cmd - the command's namepublic Command()
| Method Detail |
|---|
public java.util.Vector getAllSubCommandsByName(java.lang.String key)
public java.lang.String getCommand()
public void setCommandArgument(java.lang.String arg)
arg - the argumentpublic java.lang.String getCommandArgument()
public void setCommandModifier(java.lang.String arg)
arg - the modifierpublic java.lang.String getCommandModifier()
public java.lang.String getKey(java.lang.String key)
key - the key
public void setKeyArgument(java.lang.String key,
java.lang.String arg)
key - the keyarg - the argument
public void setKeyModifier(java.lang.String key,
java.lang.String mod)
key - the keymod - the modifierpublic java.lang.String getKeyModifier(java.lang.String key)
key - the key
public java.util.Enumeration getKeys()
public Command getSubCommandByName(java.lang.String key)
key - the subcommands name
public java.util.Vector getSubCommands()
public void addKey(java.lang.String key,
java.lang.String arg)
key - the keyarg - the argumentpublic void addKey(java.lang.String key)
key - the keypublic void addSubCommand(Command command)
command - the subcommandpublic boolean hasKeys()
public boolean parse(java.lang.String cmd)
cmd - the Stringpublic java.lang.String print()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||