public final class CmdLineOption extends Object
| Constructor and Description |
|---|
CmdLineOption(String key,
String valueName,
String usage)
Constructor for a optional option.
|
CmdLineOption(String key,
String valueName,
String usage,
boolean required)
Constructor with required argument.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getKey()
Returns the key of the option.
|
String |
getOptionText(MessagesWrapper msg)
Returns the option text.
|
String |
getUsage()
Returns the text displayed in the usage message.
|
String |
getValueName()
Returns the name of the value displayed in the usage message.
|
boolean |
isRequired()
Returns if the the value is required or optional.
|
public CmdLineOption(String key, String valueName, String usage)
key - Key (short name) of the option.valueName - Name of the value displayed in the usage message.usage - Text displayed in the usage message.public CmdLineOption(String key, String valueName, String usage, boolean required)
key - Key (short name) of the option.valueName - Name of the value displayed in the usage message.usage - Text displayed in the usage message.required - Determines if the value is required or optional.public final String getKey()
public final String getUsage()
public final boolean isRequired()
true else false.public final String getValueName()
public final String getOptionText(MessagesWrapper msg)
msg - Localized message texts.Copyright © 2013 Future Invent Informationsmanagement GmbH, Hamburg (Germany). All Rights Reserved.