F - public abstract class ConfigurableParameter<F>
extends java.lang.Object
getId()), a domain that is either given
as discrete enumeration or as a range of values in an interval, and a default value.| Constructor and Description |
|---|
ConfigurableParameter(java.lang.String id,
F[] values,
F defaultValue)
Create new configurable parameter ranging over a discrete domain of values, wit given default value.
|
ConfigurableParameter(java.lang.String id,
F min,
F max,
F defaultValue)
Create a new configurable parameter ranging over values from the given interval with a given default value.
|
| Modifier and Type | Method and Description |
|---|---|
F[] |
getDiscreteDomain() |
java.lang.String |
getId() |
F |
getIntervalMax() |
F |
getIntervalMin() |
F |
getValue() |
boolean |
isIntervalDomain() |
protected abstract boolean |
isValidIntervalValue(F value) |
boolean |
isValidValue(F value) |
void |
setDiscreteDomain(F[] values)
Set a list of values the feature can take.
|
void |
setId(java.lang.String id) |
void |
setIntervalDomain(F min,
F max)
Set a range of values the feature can take.
|
void |
setValue(java.lang.Object value)
Set chosen value of the feature.
|
void |
updateParameter(ConfigurableParameter<F> update)
Update domain and value of this parameter by copying values from the given parameter.
|
public ConfigurableParameter(java.lang.String id,
F[] values,
F defaultValue)
throws InvalidConfigurationException
element - values - defaultValue - InvalidConfigurationExceptionpublic ConfigurableParameter(java.lang.String id,
F min,
F max,
F defaultValue)
throws InvalidConfigurationException
element - min - max - defaultValue - InvalidConfigurationExceptionpublic void setIntervalDomain(F min, F max)
min - max - public F getIntervalMin()
isIntervalDomain())public F getIntervalMax()
isIntervalDomain())public void setDiscreteDomain(F[] values)
values - public F[] getDiscreteDomain()
isIntervalDomain())public boolean isIntervalDomain()
setIntervalDomain(Object, Object) is used to
set the domain), and false iff domain of the feature is a
discrete domain (this is the case when
setDiscreteDomain(Object[]) is used to set the domain)public void setValue(java.lang.Object value)
throws InvalidConfigurationException
value - InvalidConfigurationException - if value is invalid for this featurepublic F getValue()
public boolean isValidValue(F value)
value - protected abstract boolean isValidIntervalValue(F value)
public java.lang.String getId()
public void setId(java.lang.String id)
public void updateParameter(ConfigurableParameter<F> update) throws InvalidConfigurationException
update - InvalidConfigurationException