es.udc.gii.common.eaf.problem.constraint
Class EqualityConstraint
java.lang.Object
es.udc.gii.common.eaf.problem.constraint.Constraint
es.udc.gii.common.eaf.problem.constraint.EqualityConstraint
- All Implemented Interfaces:
- Configurable
public abstract class EqualityConstraint
- extends Constraint
This abstract class implements an equality constraint.
To configure a subclass of this class the xml code should be like:
<Constraint>
<Class>value</Class>
<Threshold>value</Threshold>
</Constraint>
Where the tag Class is mandatory and it should be the name of a class which implements a constraint.
The tag Threshold should be a double value which represent the threshold allowed to this constraint.
If this tag does not appear in the configuration, the value of the threshold parameter is set to its
default value.
Default values:
- Threshold default value is 1.0e-6
- Since:
- 1.0
- Author:
- Grupo Integrado de IngenierĂa (www.gii.udc.es)
Method Summary |
void |
configure(org.apache.commons.configuration.Configuration conf)
Configures the specific element that implements this method. |
boolean |
isViolated(double value)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
threshold
private double threshold
EqualityConstraint
public EqualityConstraint()
configure
public void configure(org.apache.commons.configuration.Configuration conf)
- Description copied from interface:
Configurable
- Configures the specific element that implements this method.
- Specified by:
configure
in interface Configurable
- Overrides:
configure
in class Constraint
- Parameters:
conf
- a Configuration object.- See Also:
Configuration
isViolated
public boolean isViolated(double value)
- Specified by:
isViolated
in class Constraint