|
||||||||||
| 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(String[] args)
Constructor |
|
Getopt(String[] args,
String prefix)
Constructor. |
|
| Method Summary | |
|---|---|
boolean |
contains(String option)
|
boolean |
getBooleanValue(String option)
Returns the boolean value for the given option. |
boolean |
getBooleanValue(String option,
boolean defaultValue)
Returns the boolean value for the given option. |
String |
getStringValue(String option)
Returns the string value for the given option. |
String |
getStringValue(String option,
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(String[] args)
args - the command line parameters
public Getopt(String[] args,
String prefix)
args - the command line parametersprefix - the prefix for command line paramters| Method Detail |
|---|
public boolean contains(String option)
option - the option we are looking for
public int length()
public String getStringValue(String option)
option - the option
public String getStringValue(String option,
String defaultValue)
option - the optiondefaultValue - the default value if the option is not defined
public boolean getBooleanValue(String option)
option - the option
public boolean getBooleanValue(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 | |||||||||