Class AbstractParameterization
- java.lang.Object
-
- elki.utilities.optionhandling.parameterization.AbstractParameterization
-
- All Implemented Interfaces:
Parameterization
- Direct Known Subclasses:
ChainedParameterization
,EmptyParameterization
,ListParameterization
,SerializedParameterization
public abstract class AbstractParameterization extends java.lang.Object implements Parameterization
Abstract class with shared code for parameterization handling.- Since:
- 0.3
- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.List<ParameterException>
errors
Errorsprivate static Logging
LOG
The logger of the class.
-
Constructor Summary
Constructors Constructor Description AbstractParameterization()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearErrors()
Clear errors.void
failOnErrors()
Fail on errors, log any error that had occurred.java.util.Collection<ParameterException>
getErrors()
Get the configuration errors thrown inParameterization.grab(elki.utilities.optionhandling.parameters.Parameter<?>)
void
logAndClearReportedErrors()
Log any error that has accumulated.void
reportError(ParameterException e)
Report a configuration 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, grab, hasErrors, hasUnusedParameters, setValueForOption, tryInstantiate
-
-
-
-
Field Detail
-
LOG
private static final Logging LOG
The logger of the class.
-
errors
java.util.List<ParameterException> errors
Errors
-
-
Method Detail
-
getErrors
public java.util.Collection<ParameterException> getErrors()
Description copied from interface:Parameterization
Get the configuration errors thrown inParameterization.grab(elki.utilities.optionhandling.parameters.Parameter<?>)
- Specified by:
getErrors
in interfaceParameterization
- Returns:
- Configuration errors encountered
-
reportError
public void reportError(ParameterException e)
Description copied from interface:Parameterization
Report a configuration error.- Specified by:
reportError
in interfaceParameterization
- Parameters:
e
- Destination to report errors to
-
logAndClearReportedErrors
public void logAndClearReportedErrors()
Log any error that has accumulated.
-
clearErrors
public void clearErrors()
Clear errors.
-
failOnErrors
public void failOnErrors()
Fail on errors, log any error that had occurred.- Throws:
java.lang.RuntimeException
- if any error has occurred.
-
-