|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteu.xtreemos.xosd.client.ParsedCommand
public class ParsedCommand
Represents a XtreemOS command parsed, including the Xcommand the flags and the value associated to each flag. Flags start with a - Each flag is followed by a value (one and only one) or none. Values can not contain white spaces
Field Summary | |
---|---|
protected EnumCommand.ConsoleCommands |
command
|
protected java.util.Hashtable<java.lang.String,java.lang.String> |
flags
|
protected java.lang.String[] |
params
|
Constructor Summary | |
---|---|
ParsedCommand(java.lang.String fullCommand)
Class constructor specifying the command to be parsed. |
|
ParsedCommand(java.lang.String[] params)
|
Method Summary | |
---|---|
EnumCommand.ConsoleCommands |
getCommand()
Returns the command of this parsed Command |
int |
getFlagCount()
Get the number of parameters. |
java.lang.String |
getFlagValue(java.lang.String flag)
Returns a String containing the value associated to the given flag an empty String if there was no value for the flag, or null if this flag was not present in the command. |
java.lang.String[] |
getParams()
|
int |
numParam()
Returns the number of flags of this parsed command |
void |
setParams(java.lang.String[] params)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.util.Hashtable<java.lang.String,java.lang.String> flags
protected EnumCommand.ConsoleCommands command
protected java.lang.String[] params
Constructor Detail |
---|
public ParsedCommand(java.lang.String fullCommand) throws java.lang.Exception
fullCommand
- contains the command to be parsed
java.lang.Exception
public ParsedCommand(java.lang.String[] params) throws java.lang.Exception
command
-
java.lang.Exception
Method Detail |
---|
public EnumCommand.ConsoleCommands getCommand()
public java.lang.String getFlagValue(java.lang.String flag)
flag
-
public int numParam()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String[] getParams()
public void setParams(java.lang.String[] params)
params
- the params to setpublic int getFlagCount()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |