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

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<Integer>
          extended by de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntListParameter

public class IntListParameter
extends ListParameter<Integer>

Parameter class for a parameter specifying a list of integer 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
IntListParameter(OptionID optionID)
          Constructs an integer list parameter
IntListParameter(OptionID optionID, boolean optional)
          Constructs an integer list parameter
IntListParameter(OptionID optionID, List<ParameterConstraint<List<Integer>>> constraints, boolean optional)
          Constructs an integer list parameter
IntListParameter(OptionID optionID, List<ParameterConstraint<List<Integer>>> constraints, List<Integer> defaultValue)
          Constructs an integer list parameter
IntListParameter(OptionID optionID, ParameterConstraint<List<Integer>> constraint)
          Constructs an integer list parameter
IntListParameter(OptionID optionID, ParameterConstraint<List<Integer>> constraint, boolean optional)
          Constructs an integer list parameter
IntListParameter(OptionID optionID, ParameterConstraint<List<Integer>> constraint, List<Integer> defaultValue)
          Constructs an integer list parameter
 
Method Summary
 String getSyntax()
          Returns a string representation of the parameter's type.
 String getValueAsString()
          Get the value as string.
protected  List<Integer> 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

IntListParameter

public IntListParameter(OptionID optionID,
                        List<ParameterConstraint<List<Integer>>> constraints,
                        List<Integer> defaultValue)
Constructs an integer list parameter

Parameters:
optionID - the unique id of this parameter
constraints - the constraints of this parameter, may be null
defaultValue - the default value

IntListParameter

public IntListParameter(OptionID optionID,
                        List<ParameterConstraint<List<Integer>>> constraints,
                        boolean optional)
Constructs an integer list parameter

Parameters:
optionID - the unique id of this parameter
constraints - the constraints of this parameter, may be null
optional - specifies if this parameter is an optional parameter

IntListParameter

public IntListParameter(OptionID optionID,
                        ParameterConstraint<List<Integer>> constraint,
                        List<Integer> defaultValue)
Constructs an integer list parameter

Parameters:
optionID - the unique id of this parameter
constraint - the constraint of this parameter, may be null
defaultValue - the default value

IntListParameter

public IntListParameter(OptionID optionID,
                        ParameterConstraint<List<Integer>> constraint,
                        boolean optional)
Constructs an integer list parameter

Parameters:
optionID - the unique id of this parameter
constraint - the constraint of this parameter, may be null
optional - specifies if this parameter is an optional parameter

IntListParameter

public IntListParameter(OptionID optionID,
                        ParameterConstraint<List<Integer>> constraint)
Constructs an integer list parameter

Parameters:
optionID - the unique id of this parameter
constraint - the constraint of this parameter, may be null

IntListParameter

public IntListParameter(OptionID optionID,
                        boolean optional)
Constructs an integer list parameter

Parameters:
optionID - the unique id of this parameter
optional - specifies if this parameter is an optional parameter

IntListParameter

public IntListParameter(OptionID optionID)
Constructs an integer list parameter

Parameters:
optionID - the unique id of this parameter
Method Detail

getValueAsString

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

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

parseValue

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

Specified by:
parseValue in class Parameter<List<Integer>,List<Integer>>
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<Integer>,List<Integer>>
Returns:
"<int_1,...,int_n>"

Release 0.4.0 (2011-09-20_1324)