public class ChoiceParameter extends SimpleParameter<String>
defaultValue, hasDefaultValue, name, value
Constructor and Description |
---|
ChoiceParameter(ParameterizedBase owner,
String name)
Set the parameter name and add this parameter to the list of parameters
stored by owner.
|
Modifier and Type | Method and Description |
---|---|
ChoiceParameter |
addChoices(String... choices)
Add additional choices.
|
ChoiceParameter |
addHiddenChoices(String... hiddenChoices)
Add additional hidden choices.
|
void |
configure(ParameterTool parameterTool)
Read and parse the parameter value from command-line arguments.
|
String |
getUsage()
An informal usage string.
|
ChoiceParameter |
setDefaultValue(String defaultValue)
Set the default value, used if no value is set by the command-line
configuration.
|
String |
toString() |
getValue, isHidden
public ChoiceParameter(ParameterizedBase owner, String name)
owner
- the Parameterized
using this Parameter
name
- the parameter namepublic ChoiceParameter setDefaultValue(String defaultValue)
SimpleParameter
setDefaultValue
in class SimpleParameter<String>
defaultValue
- the default valuepublic ChoiceParameter addChoices(String... choices)
choices
- additional choicespublic ChoiceParameter addHiddenChoices(String... hiddenChoices)
hiddenChoices
- additional hidden choicespublic String getUsage()
Parameter
Optional parameters are enclosed by "[" and "]".
Generic values are represented by all-caps with specific values enclosed by "<" and ">".
public void configure(ParameterTool parameterTool)
Parameter
parameterTool
- parameter parserCopyright © 2014–2019 The Apache Software Foundation. All rights reserved.