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

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<List<Double>>
          extended by de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.VectorListParameter

public class VectorListParameter
extends ListParameter<List<Double>>

Parameter class for a parameter specifying a list of vectors.


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
VectorListParameter(OptionID optionID)
          Constructs a vector list parameter with the given name and description.
VectorListParameter(OptionID optionID, boolean optional)
          Constructs a vector list parameter with the given name and description.
VectorListParameter(OptionID optionID, List<ParameterConstraint<List<List<Double>>>> constraints, boolean optional)
          Constructs a vector list parameter with the given name and description.
VectorListParameter(OptionID optionID, List<ParameterConstraint<List<List<Double>>>> constraints, List<List<Double>> defaultValue)
          Constructs a vector list parameter with the given name and description.
VectorListParameter(OptionID optionID, ParameterConstraint<List<List<Double>>> constraint)
          Constructs a vector list parameter with the given name and description.
VectorListParameter(OptionID optionID, ParameterConstraint<List<List<Double>>> constraint, boolean optional)
          Constructs a vector list parameter with the given name and description.
VectorListParameter(OptionID optionID, ParameterConstraint<List<List<Double>>> constraint, List<List<Double>> defaultValue)
          Constructs a vector list parameter with the given name and description.
 
Method Summary
 String getSyntax()
          Returns a string representation of the parameter's type.
 String getValueAsString()
          Get the value as string.
protected  List<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

VectorListParameter

public VectorListParameter(OptionID optionID,
                           List<ParameterConstraint<List<List<Double>>>> constraints,
                           List<List<Double>> defaultValue)
Constructs a vector list parameter with the given name and description.

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

VectorListParameter

public VectorListParameter(OptionID optionID,
                           List<ParameterConstraint<List<List<Double>>>> constraints,
                           boolean optional)
Constructs a vector list parameter with the given name and description.

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

VectorListParameter

public VectorListParameter(OptionID optionID,
                           ParameterConstraint<List<List<Double>>> constraint,
                           List<List<Double>> defaultValue)
Constructs a vector list parameter with the given name and description.

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

VectorListParameter

public VectorListParameter(OptionID optionID,
                           ParameterConstraint<List<List<Double>>> constraint,
                           boolean optional)
Constructs a vector list parameter with the given name and description.

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

VectorListParameter

public VectorListParameter(OptionID optionID,
                           ParameterConstraint<List<List<Double>>> constraint)
Constructs a vector list parameter with the given name and description.

Parameters:
optionID - Option ID
constraint - Constraint

VectorListParameter

public VectorListParameter(OptionID optionID,
                           boolean optional)
Constructs a vector list parameter with the given name and description.

Parameters:
optionID - Option ID
optional - Optional flag

VectorListParameter

public VectorListParameter(OptionID optionID)
Constructs a vector list parameter with the given name and description.

Parameters:
optionID - Option ID
Method Detail

getValueAsString

public String getValueAsString()
Get the value as string. May return null

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

parseValue

protected List<List<Double>> parseValue(Object obj)
                                 throws ParameterException
Parse a given value into the destination type.

Specified by:
parseValue in class Parameter<List<List<Double>>,List<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<List<Double>>,List<List<Double>>>
Returns:
"<double_11,...,double_1n:...:double_m1,...,double_mn>" ;

Release 0.4.0 (2011-09-20_1324)