public class SerializedParameterization extends AbstractParameterization
ListParameterization
where possible.Modifier and Type | Field and Description |
---|---|
static String |
OPTION_PREFIX
Prefix of option markers on the command line.
|
(package private) LinkedList<String> |
parameters
Parameter storage
|
errors
Constructor and Description |
---|
SerializedParameterization()
Constructor
|
SerializedParameterization(List<String> args)
Constructor
|
SerializedParameterization(String[] args)
Constructor
|
Modifier and Type | Method and Description |
---|---|
Parameterization |
descend(Object option)
Descend parameterization tree into sub-option.
|
List<String> |
getRemainingParameters()
Return the yet unused parameters.
|
boolean |
hasUnusedParameters()
Check for unused parameters
|
void |
logUnusedParameters()
Log a warning if there were unused parameters.
|
boolean |
setValueForOption(Parameter<?> opt)
Perform the actual parameter assignment.
|
checkConstraint, clearErrors, failOnErrors, finalize, getErrors, grab, hasErrors, logAndClearReportedErrors, reportError, reportInternalParameterizationErrors, tryInstantiate, tryInstantiate
public static final String OPTION_PREFIX
LinkedList<String> parameters
public SerializedParameterization()
public SerializedParameterization(String[] args)
args
- Parameterspublic List<String> getRemainingParameters()
public boolean hasUnusedParameters()
Parameterization
true
if at least one parameter was not consumedpublic void logUnusedParameters()
public boolean setValueForOption(Parameter<?> opt) throws ParameterException
AbstractParameterization
setValueForOption
in interface Parameterization
setValueForOption
in class AbstractParameterization
opt
- Option to be setParameterException
- on assignment errors.public 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