Class UnParameterization
- java.lang.Object
-
- elki.utilities.optionhandling.parameterization.UnParameterization
-
- All Implemented Interfaces:
Parameterization
public class UnParameterization extends java.lang.Object implements Parameterization
Parameterization handler that doesn't set any parameters.This is mostly useful for documentation purposes, listing all parameters in a non-recursive way.
- Since:
- 0.3
- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.List<ParameterException>errorsErrors
-
Constructor Summary
Constructors Constructor Description UnParameterization()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection<ParameterException>getErrors()Get the configuration errors thrown inParameterization.grab(elki.utilities.optionhandling.parameters.Parameter<?>)booleangrab(Parameter<?> opt)Get the option value from the Parameterization.booleanhasUnusedParameters()Check for unused parametersvoidreportError(ParameterException e)Report a configuration error.booleansetValueForOption(Parameter<?> opt)Assign a value for an option, but not using default values and throwing exceptions on error.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface elki.utilities.optionhandling.parameterization.Parameterization
descend, hasErrors, tryInstantiate
-
-
-
-
Field Detail
-
errors
java.util.List<ParameterException> errors
Errors
-
-
Method Detail
-
hasUnusedParameters
public boolean hasUnusedParameters()
Description copied from interface:ParameterizationCheck for unused parameters- Specified by:
hasUnusedParametersin interfaceParameterization- Returns:
trueif at least one parameter was not consumed
-
getErrors
public java.util.Collection<ParameterException> getErrors()
Description copied from interface:ParameterizationGet the configuration errors thrown inParameterization.grab(elki.utilities.optionhandling.parameters.Parameter<?>)- Specified by:
getErrorsin interfaceParameterization- Returns:
- Configuration errors encountered
-
grab
public boolean grab(Parameter<?> opt)
Description copied from interface:ParameterizationGet the option value from the Parameterization.Note: this method returns success; the actual value can be obtained from
optitself!In particular
Parameterization.grab(elki.utilities.optionhandling.parameters.Parameter<?>)can returntruewhenFlag.getValue()returnsfalse! Instead the semantics ofgrabare those ofParameter#isDefined().This method will catch
ParameterExceptions and store them to be retrieved byParameterization.getErrors().- Specified by:
grabin interfaceParameterization- Parameters:
opt- Option to add- Returns:
- if the value is available (= readable)
-
reportError
public void reportError(ParameterException e)
Description copied from interface:ParameterizationReport a configuration error.- Specified by:
reportErrorin interfaceParameterization- Parameters:
e- Destination to report errors to
-
setValueForOption
public boolean setValueForOption(Parameter<?> opt)
Description copied from interface:ParameterizationAssign a value for an option, but not using default values and throwing exceptions on error.- Specified by:
setValueForOptionin interfaceParameterization- Parameters:
opt- Parameter to set- Returns:
- Success code
-
-