public class ListParameterization extends AbstractParameterization
Modifier and Type | Field and Description |
---|---|
(package private) LinkedList<Pair<OptionID,Object>> |
parameters
The actual parameters, for storage
|
errors
Constructor and Description |
---|
ListParameterization()
Default constructor.
|
ListParameterization(Collection<Pair<OptionID,Object>> dbParameters)
Constructor with an existing collection.
|
Modifier and Type | Method and Description |
---|---|
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() |
checkConstraint, clearErrors, failOnErrors, finalize, getErrors, grab, hasErrors, logAndClearReportedErrors, reportError, reportInternalParameterizationErrors, tryInstantiate, tryInstantiate
LinkedList<Pair<OptionID,Object>> parameters
public ListParameterization()
public ListParameterization(Collection<Pair<OptionID,Object>> dbParameters)
dbParameters
- existing parameter collectionpublic 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 setParameterException
- 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