|
|
|||||||||||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.lmu.ifi.dbs.elki.utilities.optionhandling.Option<T>
de.lmu.ifi.dbs.elki.utilities.optionhandling.Parameter<List<T>,List<T>>
de.lmu.ifi.dbs.elki.utilities.optionhandling.ListParameter<String>
de.lmu.ifi.dbs.elki.utilities.optionhandling.ClassListParameter<C>
C
- Class typepublic class ClassListParameter<C>
Parameter class for a parameter specifying a list of class names.
Field Summary | |
---|---|
private Class<C> |
restrictionClass
The restriction class for the list of class names. |
Fields inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.ListParameter |
---|
SPLIT, VECTOR_SPLIT |
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 | |
---|---|
ClassListParameter(OptionID optionID,
Class<?> restrictionClass)
Constructs a class list parameter with the given optionID and restriction class. |
|
ClassListParameter(OptionID optionID,
Class<?> restrictionClass,
boolean optional)
Constructs a class list parameter with the given optionID and restriction class. |
Method Summary | |
---|---|
String[] |
getRestrictionClasses()
Returns the class names allowed according to the restriction class of this parameter. |
String |
getSyntax()
Returns a string representation of the parameter's type. |
List<C> |
instantiateClasses()
Returns a list of new instances for the value (i.e., the class name) of this class list parameter. |
boolean |
isValid(String value)
Checks if the given argument is valid for this option. |
void |
setValue(String value)
Sets the value of the option. |
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.ListParameter |
---|
getListSize, toString |
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, setShortDescription |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private Class<C> restrictionClass
Constructor Detail |
---|
public ClassListParameter(OptionID optionID, Class<?> restrictionClass)
optionID
- the unique id of this parameterrestrictionClass
- the restriction class of the list of class namespublic ClassListParameter(OptionID optionID, Class<?> restrictionClass, boolean optional)
optionID
- the unique id of this parameterrestrictionClass
- the restriction class of the list of class namesoptional
- specifies if this parameter is an optional parameterMethod Detail |
---|
public void setValue(String value) throws ParameterException
Option
setValue
in class Option<List<String>>
value
- the option's value to be set
ParameterException
- if the given value is not a valid value for this option.public String[] getRestrictionClasses()
public boolean isValid(String value) throws ParameterException
Option
isValid
in class Option<List<String>>
value
- option value to be checked
ParameterException
- if the given value is not a valid value for this option.public String getSyntax()
getSyntax
in class Option<List<String>>
public List<C> instantiateClasses() throws ParameterException
ParameterException
- if the instantiation cannot be performed
successfully or the value of this class list parameter is not set
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |