|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.AbstractParameterization de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization
public class ListParameterization
Parameterization handler using a List and OptionIDs, for programmatic use.
Field Summary | |
---|---|
(package private) LinkedList<Pair<OptionID,Object>> |
parameters
The actual parameters, for storage |
Fields inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.AbstractParameterization |
---|
errors |
Constructor Summary | |
---|---|
ListParameterization()
Default constructor. |
|
ListParameterization(Collection<Pair<OptionID,Object>> dbParameters)
Constructor with an existing collection. |
Method Summary | |
---|---|
void |
addFlag(OptionID optionid)
Add a flag to the parameter list |
void |
addParameter(OptionID optionid,
Object value)
Add a parameter to the parameter list |
Parameterization |
descend(Object option)
Descend parameterization tree into sub-option. |
void |
forwardOption(Flag flag)
Convenience - add a Flag option directly. |
void |
forwardOption(Parameter<?,?> param)
Convenience - add a Parameter for forwarding |
List<Pair<OptionID,Object>> |
getRemainingParameters()
Return the yet unused parameters. |
boolean |
hasUnusedParameters()
Check for unused parameters |
ArrayList<String> |
serialize()
Serialize parameters. |
boolean |
setValueForOption(Parameter<?,?> opt)
Perform the actual parameter assignment. |
String |
toString()
|
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.AbstractParameterization |
---|
checkConstraint, clearErrors, failOnErrors, finalize, getErrors, grab, hasErrors, logAndClearReportedErrors, reportError, reportInternalParameterizationErrors, tryInstantiate, tryInstantiate |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
LinkedList<Pair<OptionID,Object>> parameters
Constructor Detail |
---|
public ListParameterization()
public ListParameterization(Collection<Pair<OptionID,Object>> dbParameters)
dbParameters
- existing parameter collectionMethod Detail |
---|
public void addFlag(OptionID optionid)
optionid
- Option IDpublic void addParameter(OptionID optionid, Object value)
optionid
- Option IDvalue
- Valuepublic void forwardOption(Flag flag)
flag
- Flag to add, if setpublic void forwardOption(Parameter<?,?> param)
param
- Parameter to addpublic boolean setValueForOption(Parameter<?,?> opt) throws ParameterException
AbstractParameterization
setValueForOption
in interface Parameterization
setValueForOption
in class AbstractParameterization
opt
- Option to be set
ParameterException
- on assignment errors.public List<Pair<OptionID,Object>> getRemainingParameters()
public boolean hasUnusedParameters()
Parameterization
true
if at least one parameter was not consumedpublic Parameterization descend(Object option)
ClassParameter.instantiateClass(de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.Parameterization)
.
You only need to call this when you want to expose the tree structure
without offering a class choice as parameter.
Default implementation, for flat parameterizations.
option
- Option subtree
public String toString()
toString
in class Object
public ArrayList<String> serialize()
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |