es.udc.gii.common.eaf.problem.constraint
Class EqualityConstraint

java.lang.Object
  extended by es.udc.gii.common.eaf.problem.constraint.Constraint
      extended by 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:

Since:
1.0
Author:
Grupo Integrado de IngenierĂ­a (www.gii.udc.es)

Field Summary
private  double threshold
           
 
Constructor Summary
EqualityConstraint()
           
 
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 es.udc.gii.common.eaf.problem.constraint.Constraint
evaluate, getConstraintValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

threshold

private double threshold
Constructor Detail

EqualityConstraint

public EqualityConstraint()
Method Detail

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