public class StringParameter extends AbstractParameter<StringParameter,String>
constraints, defaultValue, givenValue, optionalParameter, optionid, shortDescription
Constructor and Description |
---|
StringParameter(OptionID optionID)
Constructs a string parameter with the given optionID.
|
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, validate
public StringParameter(OptionID optionID, String defaultValue)
optionID
- the unique id of the parameterdefaultValue
- the default value of the parameterpublic StringParameter(OptionID optionID)
optionID
- the unique id of the parameterpublic String getValueAsString()
Parameter
null
getValueAsString
in interface Parameter<String>
getValueAsString
in class AbstractParameter<StringParameter,String>
protected String parseValue(Object obj) throws ParameterException
AbstractParameter
parseValue
in class AbstractParameter<StringParameter,String>
obj
- Object to parse (may be a string representation!)ParameterException
- when the object cannot be parsed.public String getSyntax()
getSyntax
in interface Parameter<String>
getSyntax
in class AbstractParameter<StringParameter,String>
Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.