public class StringOption extends Object implements CmdLineOption
StringOption class models a command line
option that may contain a string value. Includes options
like: -file file_name. Here, the option key is
"file", and the option value is "file_name".OptionParser| Modifier and Type | Field and Description |
|---|---|
String |
value
The value of the option as specified on the command line, or null
if option not present.
|
| Constructor and Description |
|---|
StringOption(String key)
Creates a new string option.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getKey()
Returns the string that the
OptionParser seeks
on the command line in association with the CmdLineOption. |
public String value
public String getKey()
CmdLineOptionOptionParser seeks
on the command line in association with the CmdLineOption.
Initial '-' not included.getKey in interface CmdLineOptionOptionParserCopyright © 2025. All rights reserved.