public class ListParameterization extends AbstractParameterization
Modifier and Type | Class and Description |
---|---|
protected static class |
ListParameterization.ParameterPair
Parameter pair, package-private.
|
Modifier and Type | Field and Description |
---|---|
(package private) java.util.List<ListParameterization.ParameterPair> |
parameters
The actual parameters, for storage
|
errors
Constructor and Description |
---|
ListParameterization()
Default constructor.
|
ListParameterization(java.util.Collection<ListParameterization.ParameterPair> dbParameters)
Constructor with an existing collection.
|
Modifier and Type | Method and Description |
---|---|
ListParameterization |
addFlag(OptionID optionid)
Add a flag to the parameter list
|
ListParameterization |
addFlag(java.lang.String optionid)
Add a flag to the parameter list
|
protected ListParameterization |
addParameter(ListParameterization.ParameterPair pair)
Add a parameter to the parameter list
|
ListParameterization |
addParameter(OptionID optionid,
java.lang.Object value)
Add a parameter to the parameter list
|
ListParameterization |
addParameter(java.lang.String optionid,
java.lang.Object value)
Add a parameter to the parameter list
|
ListParameterization |
descend(java.lang.Object option)
Descend parameterization tree into sub-option.
|
java.util.List<ListParameterization.ParameterPair> |
getRemainingParameters()
Return the yet unused parameters.
|
boolean |
hasUnusedParameters()
Check for unused parameters
|
java.util.ArrayList<java.lang.String> |
serialize()
Serialize parameters.
|
boolean |
setValueForOption(Parameter<?> opt)
Assign a value for an option, but not using default values and throwing
exceptions on error.
|
java.lang.String |
toString() |
clearErrors, failOnErrors, finalize, getErrors, logAndClearReportedErrors, reportError
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
grab, hasErrors, tryInstantiate
java.util.List<ListParameterization.ParameterPair> parameters
public ListParameterization()
public ListParameterization(java.util.Collection<ListParameterization.ParameterPair> dbParameters)
dbParameters
- existing parameter collectionpublic ListParameterization addFlag(OptionID optionid)
optionid
- Option IDpublic ListParameterization addFlag(java.lang.String optionid)
optionid
- Option IDpublic ListParameterization addParameter(OptionID optionid, java.lang.Object value)
optionid
- Option IDvalue
- Valueprotected ListParameterization addParameter(ListParameterization.ParameterPair pair)
pair
- Parameter pairpublic ListParameterization addParameter(java.lang.String optionid, java.lang.Object value)
optionid
- Option IDvalue
- Valuepublic boolean setValueForOption(Parameter<?> opt) throws ParameterException
Parameterization
opt
- Parameter to setParameterException
- on assignment errors.public java.util.List<ListParameterization.ParameterPair> getRemainingParameters()
public boolean hasUnusedParameters()
Parameterization
true
if at least one parameter was not consumedpublic ListParameterization descend(java.lang.Object option)
Parameterization
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.option
- Option subtreepublic java.lang.String toString()
toString
in class java.lang.Object
public java.util.ArrayList<java.lang.String> serialize()
Copyright © 2019 ELKI Development Team. License information.