|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.freehep.util.argv.StringOption
public class StringOption
A String option for use with ArgumentParser. A String option may have a default value. If specified on the command line, a string option takes the value of the argument immediately following its flag.
| Constructor Summary | |
|---|---|
StringOption(String flag,
String name,
String description)
Initialize a new String argument with the given flag and description but without a default value. |
|
StringOption(String flag,
String name,
String defaultValue,
String description)
|
|
StringOption(String flag,
String shortCut,
String name,
String defaultValue,
String description)
|
|
StringOption(String flag,
String shortCut,
String name,
String defaultValue,
String description,
boolean bailOut)
|
|
| Method Summary | |
|---|---|
String |
getOption()
Must return the flag and parameters of this option. |
String |
getUsage()
Must return a description of the usage of this option. |
String |
getValue()
Return the string value of this argument, which may be null. |
int |
parse(List<String> values)
Parsing method invoked by ArgumentParser. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StringOption(String flag,
String name,
String description)
public StringOption(String flag,
String name,
String defaultValue,
String description)
public StringOption(String flag,
String shortCut,
String name,
String defaultValue,
String description)
public StringOption(String flag,
String shortCut,
String name,
String defaultValue,
String description,
boolean bailOut)
| Method Detail |
|---|
public String getValue()
public int parse(List<String> values)
throws MissingArgumentException,
BailOutException
parse in interface OptionMissingArgumentException
BailOutExceptionpublic String getOption()
Option
getOption in interface Optionpublic String getUsage()
Option
getUsage in interface Option
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||