Constructor and Description |
---|
Getopt(String[] args)
Constructor
|
Getopt(String[] args,
String prefix)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(String option)
Does the command-line options exist?
|
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() |
public boolean contains(String option)
option
- the option we are looking forpublic int length()
public String getStringValue(String option)
option
- the optionpublic String getStringValue(String option, String defaultValue)
option
- the optiondefaultValue
- the default value if the option is not definedpublic boolean getBooleanValue(String option)
option
- the optionpublic boolean getBooleanValue(String option, boolean defaultValue)
option
- the optiondefaultValue
- the default value if the option is not definedCopyright © 2004–1970 The Apache Software Foundation. All rights reserved.