de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters
Class DoubleListParameter

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.Parameter<List<T>,List<T>>
      extended by de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.ListParameter<Double>
          extended by de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.DoubleListParameter

public class DoubleListParameter
extends ListParameter<Double>

Parameter class for a parameter specifying a list of double values.


Field Summary
 
Fields inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.ListParameter
LIST_SEP, SPLIT, VECTOR_SEP, VECTOR_SPLIT
 
Fields inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.Parameter
constraints, defaultValue, givenValue, optionalParameter, optionid, shortDescription
 
Constructor Summary
DoubleListParameter(OptionID optionID)
          Constructs a list parameter with the given optionID.
DoubleListParameter(OptionID optionID, boolean optional)
          Constructs a list parameter with the given optionID and optional flag.
DoubleListParameter(OptionID optionID, List<ParameterConstraint<List<Double>>> constraints, boolean optional)
          Constructs a list parameter with the given optionID.
DoubleListParameter(OptionID optionID, List<ParameterConstraint<List<Double>>> constraints, List<Double> defaultValue)
          Constructs a list parameter with the given optionID.
DoubleListParameter(OptionID optionID, ParameterConstraint<List<Double>> constraint)
          Constructs a list parameter with the given optionID.
DoubleListParameter(OptionID optionID, ParameterConstraint<List<Double>> constraint, boolean optional)
          Constructs a list parameter with the given optionID.
DoubleListParameter(OptionID optionID, ParameterConstraint<List<Double>> constraint, List<Double> defaultValue)
          Constructs a list parameter with the given optionID.
 
Method Summary
 String getSyntax()
          Returns a string representation of the parameter's type.
 String getValueAsString()
          Get the value as string.
protected  List<Double> parseValue(Object obj)
          Parse a given value into the destination type.
 
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.ListParameter
asString, getListSize
 
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.Parameter
addConstraint, getDefaultValue, getDefaultValueAsString, getFullDescription, getGivenValue, getName, getOptionID, getShortDescription, getValue, getValuesDescription, hasDefaultValue, hasValuesDescription, isDefined, isOptional, isValid, setDefaultValue, setOptional, setShortDescription, setValue, setValueInternal, tookDefaultValue, tryDefaultValue, useDefaultValue, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DoubleListParameter

public DoubleListParameter(OptionID optionID,
                           List<ParameterConstraint<List<Double>>> constraints,
                           List<Double> defaultValue)
Constructs a list parameter with the given optionID.

Parameters:
optionID - Option ID
constraints - Constraints
defaultValue - Default value

DoubleListParameter

public DoubleListParameter(OptionID optionID,
                           List<ParameterConstraint<List<Double>>> constraints,
                           boolean optional)
Constructs a list parameter with the given optionID.

Parameters:
optionID - Option ID
constraints - Constraints
optional - Optional flag

DoubleListParameter

public DoubleListParameter(OptionID optionID,
                           ParameterConstraint<List<Double>> constraint,
                           List<Double> defaultValue)
Constructs a list parameter with the given optionID.

Parameters:
optionID - Option ID
constraint - Constraint
defaultValue - Default value

DoubleListParameter

public DoubleListParameter(OptionID optionID,
                           ParameterConstraint<List<Double>> constraint,
                           boolean optional)
Constructs a list parameter with the given optionID.

Parameters:
optionID - Option ID
constraint - Constraint
optional - Optional flag

DoubleListParameter

public DoubleListParameter(OptionID optionID,
                           ParameterConstraint<List<Double>> constraint)
Constructs a list parameter with the given optionID.

Parameters:
optionID - Option ID
constraint - Constraint

DoubleListParameter

public DoubleListParameter(OptionID optionID,
                           boolean optional)
Constructs a list parameter with the given optionID and optional flag.

Parameters:
optionID - Option ID
optional - Optional flag

DoubleListParameter

public DoubleListParameter(OptionID optionID)
Constructs a list parameter with the given optionID.

Parameters:
optionID - Option ID
Method Detail

getValueAsString

public String getValueAsString()
Description copied from class: Parameter
Get the value as string. May return null

Specified by:
getValueAsString in class Parameter<List<Double>,List<Double>>
Returns:
Value as string

parseValue

protected List<Double> parseValue(Object obj)
                           throws ParameterException
Description copied from class: Parameter
Parse a given value into the destination type.

Specified by:
parseValue in class Parameter<List<Double>,List<Double>>
Parameters:
obj - Object to parse (may be a string representation!)
Returns:
Parsed object
Throws:
ParameterException - when the object cannot be parsed.

getSyntax

public String getSyntax()
Returns a string representation of the parameter's type.

Specified by:
getSyntax in class Parameter<List<Double>,List<Double>>
Returns:
"<double_1,...,double_n>"

Release 0.4.0 (2011-09-20_1324)