Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

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

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.utilities.optionhandling.Option<T>
      extended by de.lmu.ifi.dbs.elki.utilities.optionhandling.Parameter<List<T>,List<T>>
          extended by de.lmu.ifi.dbs.elki.utilities.optionhandling.ListParameter<T>
Type Parameters:
T -
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.

Author:
Steffi Wanka

Field Summary
static Pattern SPLIT
          A pattern defining a ",".
static Pattern VECTOR_SPLIT
          A pattern defining a ":".
 
Fields inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.Parameter
constraints, defaultValue, optionalParameter
 
Fields inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.Option
optionid, shortDescription, value
 
Constructor Summary
ListParameter(OptionID optionID)
          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, List<T> defaultValue)
          Constructs a list parameter with the given optionID.
 
Method Summary
 int getListSize()
          Returns the size of this list parameter.
 String toString()
          Returns a string representation of this list parameter.
 
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.Parameter
addConstraint, addConstraintList, getDefaultValue, getFullDescription, getValue, getValuesDescription, hasDefaultValue, hasValuesDescription, isOptional, isSet, reset, setDefaultValue, setDefaultValueToValue, setOptional, tookDefaultValue
 
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.Option
getName, getOptionID, getShortDescription, getSyntax, isValid, setShortDescription, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SPLIT

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


VECTOR_SPLIT

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

Constructor Detail

ListParameter

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

Parameters:
optionID - the unique id of this 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,
                     ParameterConstraint<List<T>> constraint,
                     boolean optional,
                     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
optional - specifies if this parameter is an optional parameter
defaultValue - the default value of this parameter (may be null)
Method Detail

getListSize

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

Returns:
the size of this list parameter.

toString

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

Overrides:
toString in class Object

Release 0.2 (2009-07-06_1820)