|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.fulcrum.yaafi.cli.Getopt
public class Getopt
Extremly simply command line parsing class.
Constructor Summary | |
---|---|
Getopt(java.lang.String[] args)
Constructor |
|
Getopt(java.lang.String[] args,
java.lang.String prefix)
Constructor. |
Method Summary | |
---|---|
boolean |
contains(java.lang.String option)
|
boolean |
getBooleanValue(java.lang.String option)
Returns the boolean value for the given option. |
boolean |
getBooleanValue(java.lang.String option,
boolean defaultValue)
Returns the boolean value for the given option. |
java.lang.String |
getStringValue(java.lang.String option)
Returns the string value for the given option. |
java.lang.String |
getStringValue(java.lang.String option,
java.lang.String defaultValue)
Returns the string value for the given option. |
int |
length()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Getopt(java.lang.String[] args)
args
- the command line parameterspublic Getopt(java.lang.String[] args, java.lang.String prefix)
args
- the command line parametersprefix
- the prefix for command line paramtersMethod Detail |
---|
public boolean contains(java.lang.String option)
option
- the option we are looking for
public int length()
public java.lang.String getStringValue(java.lang.String option)
option
- the option
public java.lang.String getStringValue(java.lang.String option, java.lang.String defaultValue)
option
- the optiondefaultValue
- the default value if the option is not defined
public boolean getBooleanValue(java.lang.String option)
option
- the option
public boolean getBooleanValue(java.lang.String option, boolean defaultValue)
option
- the optiondefaultValue
- the default value if the option is not defined
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |