public abstract class SimpleParameter<T> extends Object implements Parameter<T>
Parameter
with a default value.Modifier and Type | Field and Description |
---|---|
protected T |
defaultValue |
protected boolean |
hasDefaultValue |
protected String |
name |
protected T |
value |
Modifier | Constructor and Description |
---|---|
protected |
SimpleParameter(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 |
---|---|
String |
getUsage()
An informal usage string.
|
T |
getValue()
Get the parameter value.
|
boolean |
isHidden()
A hidden parameter is parsed from the command-line configuration but is
not printed in the usage string.
|
protected SimpleParameter |
setDefaultValue(T defaultValue)
Set the default value, used if no value is set by the command-line
configuration.
|
protected final String name
protected boolean hasDefaultValue
protected T defaultValue
protected T value
protected SimpleParameter(ParameterizedBase owner, String name)
owner
- the Parameterized
using this Parameter
name
- the parameter nameprotected SimpleParameter setDefaultValue(T defaultValue)
defaultValue
- the default valuepublic String getUsage()
Parameter
Optional parameters are enclosed by "[" and "]".
Generic values are represented by all-caps with specific values enclosed by "<" and ">".
public boolean isHidden()
Parameter
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.