public abstract class AbstractParameterizer extends java.lang.Object implements Parameterizer
Modifier and Type | Field and Description |
---|---|
private int |
state
Parameterization state.
|
private static int |
STATE_COMPLETE
Constant for "complete" state.
|
private static int |
STATE_ERRORS
Constant for "errors" state.
|
private static int |
STATE_FRESH
Constant for "fresh" state.
|
private static int |
STATE_INIT
Constant for "initializing" state.
|
Constructor and Description |
---|
AbstractParameterizer() |
Modifier and Type | Method and Description |
---|---|
void |
configure(Parameterization config)
Configure the class.
|
java.lang.Object |
make(Parameterization config)
Method to configure a class, then instantiate when the configuration step
was successful.
|
protected abstract java.lang.Object |
makeInstance()
Make an instance after successful configuration.
|
protected void |
makeOptions(Parameterization config)
Add all options.
|
private static final int STATE_FRESH
private static final int STATE_INIT
private static final int STATE_COMPLETE
private static final int STATE_ERRORS
private int state
protected void makeOptions(Parameterization config)
config
- Parameterization to add options to.public final void configure(Parameterization config)
Parameterizer
configure
in interface Parameterizer
config
- Parameterizationprotected abstract java.lang.Object makeInstance()
public final java.lang.Object make(Parameterization config)
Don't call this directly use unless you know what you are doing.
Instead, use Parameterization.tryInstantiate(Class)
!
Otherwise, null
will be returned, and the resulting errors can be
retrieved from the Parameterization
parameter object. In general,
you should be checking the Parameterization
object for errors
before accessing the returned value, since it may be null
unexpectedly otherwise.
config
- Parameterizationnull
Copyright © 2019 ELKI Development Team. License information.