|
||||||||||
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.SerializedParameterization
public class SerializedParameterization
Manage a parameterization serialized as String array, e.g. from command line.
When building parameter lists, use ListParameterization
where possible.
Field Summary | |
---|---|
static String |
OPTION_PREFIX
Prefix of option markers on the command line. |
(package private) LinkedList<String> |
parameters
Parameter storage |
Fields inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.AbstractParameterization |
---|
errors |
Constructor Summary | |
---|---|
SerializedParameterization()
Constructor |
|
SerializedParameterization(List<String> args)
Constructor |
|
SerializedParameterization(String[] args)
Constructor |
Method Summary | |
---|---|
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. |
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, toString, wait, wait, wait |
Field Detail |
---|
public static final String OPTION_PREFIX
LinkedList<String> parameters
Constructor Detail |
---|
public SerializedParameterization()
public SerializedParameterization(String[] args)
args
- Parameterspublic SerializedParameterization(List<String> args)
args
- Parameter listMethod Detail |
---|
public 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 set
ParameterException
- 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
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |