de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters
Class ListParameter<T>

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<T>
Type Parameters:
T - List type
Direct Known Subclasses:
ClassListParameter, DoubleListParameter, FileListParameter, IntListParameter, VectorListParameter

public abstract class ListParameter<T>
extends Parameter<List<T>,List<T>>

Abstract parameter class defining a parameter for a list of objects.


Field Summary
static String LIST_SEP
          List separator character - ":"
static Pattern SPLIT
          A pattern defining a ",".
static String VECTOR_SEP
          Vector separator character - ":"
static Pattern VECTOR_SPLIT
          A pattern defining a ":".
 
Fields inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.Parameter
constraints, defaultValue, givenValue, optionalParameter, optionid, shortDescription
 
Constructor Summary
ListParameter(OptionID optionID)
          Constructs a list parameter with the given optionID.
ListParameter(OptionID optionID, boolean optional)
          Constructs a list parameter with the given optionID and optional flag.
ListParameter(OptionID optionID, List<ParameterConstraint<List<T>>> constraints, boolean optional)
          Constructs a list parameter with the given optionID.
ListParameter(OptionID optionID, List<ParameterConstraint<List<T>>> constraints, List<T> defaultValue)
          Constructs a list parameter with the given optionID.
ListParameter(OptionID optionID, ParameterConstraint<List<T>> constraint)
          Constructs a list parameter with the given optionID.
ListParameter(OptionID optionID, ParameterConstraint<List<T>> constraint, boolean optional)
          Constructs a list parameter with the given optionID.
ListParameter(OptionID optionID, ParameterConstraint<List<T>> constraint, List<T> defaultValue)
          Constructs a list parameter with the given optionID.
 
Method Summary
protected  String asString()
          Returns a string representation of this list parameter.
 int getListSize()
          Returns the size of this list parameter.
 
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.Parameter
addConstraint, getDefaultValue, getDefaultValueAsString, getFullDescription, getGivenValue, getName, getOptionID, getShortDescription, getSyntax, getValue, getValueAsString, getValuesDescription, hasDefaultValue, hasValuesDescription, isDefined, isOptional, isValid, parseValue, 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
 

Field Detail

SPLIT

public static final Pattern SPLIT
A pattern defining a ",".


LIST_SEP

public static final String LIST_SEP
List separator character - ":"

See Also:
Constant Field Values

VECTOR_SPLIT

public static final Pattern VECTOR_SPLIT
A pattern defining a ":".


VECTOR_SEP

public static final String VECTOR_SEP
Vector separator character - ":"

See Also:
Constant Field Values
Constructor Detail

ListParameter

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

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

ListParameter

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

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

ListParameter

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

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

ListParameter

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

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

ListParameter

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

Parameters:
optionID - the unique id of this parameter
constraint - the constraint of this parameter

ListParameter

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

Parameters:
optionID - the unique id of this parameter
optional - Optional flag

ListParameter

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

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

getListSize

public int getListSize()
Returns the size of this list parameter.

Returns:
the size of this list parameter.

asString

protected String asString()
Returns a string representation of this list parameter. The elements of this list parameters are given in "[ ]", comma separated.


Release 0.4.0 (2011-09-20_1324)