|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jagatoo.commandline.Argument
public class Argument
A single argument of a command line.
Constructor Summary | |
---|---|
Argument(char shortName,
java.lang.String longName,
java.lang.String description,
boolean needsValue)
Creates a new argument. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object o)
|
java.lang.String |
getDecription()
Gets this argument's description. |
java.lang.String |
getLongName()
Gets the long name of this argument. |
char |
getShortName()
Gets the short name (one char) of this argument. |
int |
hashCode()
|
boolean |
needsValue()
Returns whether this argument needs a value or if it is a switch. |
java.lang.Object |
parseValue(java.lang.String rawValue)
Parses the concrete value from the input String. |
protected java.lang.Object |
parseValueImpl(java.lang.String rawValue)
This method must be overridden for arguments, that take non-String values. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Argument(char shortName, java.lang.String longName, java.lang.String description, boolean needsValue)
shortName
- the short name. Use '\0' for no short name.longName
- the long name. Use null for no long name.description
- the description (can be null).needsValue
- Method Detail |
---|
public final char getShortName()
public final java.lang.String getLongName()
public final java.lang.String getDecription()
public final boolean needsValue()
protected java.lang.Object parseValueImpl(java.lang.String rawValue) throws CommandlineParsingException
rawValue
- the raw String value
CommandlineParsingException
public final java.lang.Object parseValue(java.lang.String rawValue) throws CommandlineParsingException
rawValue
- the raw String value
CommandlineParsingException
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
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 |