
public class StringParameter extends Parameter<String,String>
constraints, defaultValue, givenValue, optionalParameter, optionid, shortDescription| Constructor and Description |
|---|
StringParameter(OptionID optionID)
Constructs a string parameter with the given optionID.
|
StringParameter(OptionID optionID,
boolean optional)
Constructs a string parameter with the given optionID.
|
StringParameter(OptionID optionID,
List<ParameterConstraint<String>> constraints)
Constructs a string parameter with the given optionID, constraints and
default value.
|
StringParameter(OptionID optionID,
List<ParameterConstraint<String>> constraints,
boolean optional)
Constructs a string parameter with the given optionID, constraints and
default value.
|
StringParameter(OptionID optionID,
List<ParameterConstraint<String>> constraint,
String defaultValue)
Constructs a string parameter with the given optionID, constraints and
default value.
|
StringParameter(OptionID optionID,
ParameterConstraint<String> constraint)
Constructs a string parameter with the given optionID, constraints and
default value.
|
StringParameter(OptionID optionID,
ParameterConstraint<String> constraint,
boolean optional)
Constructs a string parameter with the given optionID, constraints and
default value.
|
StringParameter(OptionID optionID,
ParameterConstraint<String> constraint,
String defaultValue)
Constructs a string parameter with the given optionID, constraints and
default value.
|
StringParameter(OptionID optionID,
String defaultValue)
Constructs a string parameter with the given optionID, and default value.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getSyntax()
Returns a string representation of the parameter's type.
|
String |
getValueAsString()
Get the value as string.
|
protected String |
parseValue(Object obj)
Parse a given value into the destination type.
|
addConstraint, getDefaultValue, getDefaultValueAsString, getFullDescription, getGivenValue, getName, getOptionID, getShortDescription, getValue, getValuesDescription, hasDefaultValue, hasValuesDescription, isDefined, isOptional, isValid, setDefaultValue, setOptional, setShortDescription, setValue, setValueInternal, tookDefaultValue, tryDefaultValue, useDefaultValue, validatepublic StringParameter(OptionID optionID, List<ParameterConstraint<String>> constraint, String defaultValue)
optionID - the unique id of the parameterconstraint - parameter constraintdefaultValue - the default value of the parameterpublic StringParameter(OptionID optionID, List<ParameterConstraint<String>> constraints, boolean optional)
optionID - the unique id of the parameterconstraints - parameter constraintoptional - Flag to signal an optional parameter.public StringParameter(OptionID optionID, List<ParameterConstraint<String>> constraints)
optionID - the unique id of the parameterconstraints - parameter constraintpublic StringParameter(OptionID optionID, ParameterConstraint<String> constraint, String defaultValue)
optionID - the unique id of the parameterconstraint - parameter constraintdefaultValue - the default value of the parameterpublic StringParameter(OptionID optionID, ParameterConstraint<String> constraint, boolean optional)
optionID - the unique id of the parameterconstraint - parameter constraintoptional - Flag to signal an optional parameter.public StringParameter(OptionID optionID, ParameterConstraint<String> constraint)
optionID - the unique id of the parameterconstraint - parameter constraintpublic StringParameter(OptionID optionID, String defaultValue)
optionID - the unique id of the parameterdefaultValue - the default value of the parameterpublic StringParameter(OptionID optionID, boolean optional)
optionID - the unique id of the parameteroptional - Flag to signal an optional parameter.public StringParameter(OptionID optionID)
optionID - the unique id of the parameterpublic String getValueAsString()
nullgetValueAsString in class Parameter<String,String>protected String parseValue(Object obj) throws ParameterException
parseValue in class Parameter<String,String>obj - Object to parse (may be a string representation!)ParameterException - when the object cannot be parsed.