Package ec.rule

Class RuleConstraints

java.lang.Object
ec.rule.RuleConstraints
All Implemented Interfaces:
Clique, Setup, Serializable

public class RuleConstraints extends Object implements Clique
RuleConstraints is a class for constraints applicable to rules. You can subclass this to add additional constraints information for different kinds of rules.
See Also:
  • Field Details

    • P_NAME

      public static final String P_NAME
      See Also:
    • constraintNumber

      public byte constraintNumber
      The byte value of the constraints -- we can only have 256 of them
    • name

      public String name
      The name of the RuleConstraints object
  • Constructor Details

    • RuleConstraints

      public RuleConstraints()
  • Method Details

    • toString

      public String toString()
      Converting the rule to a string ( the name )
      Overrides:
      toString in class Object
    • setup

      public void setup(EvolutionState state, Parameter base)
      Description copied from interface: Setup
      Sets up the object by reading it from the parameters stored in state, built off of the parameter base base. If an ancestor implements this method, be sure to call super.setup(state,base); before you do anything else.
      Specified by:
      setup in interface Setup
    • constraintsFor

      public static RuleConstraints constraintsFor(String constraintsName, EvolutionState state)
      You must guarantee that after calling constraintsFor(...) one or several times, you call state.output.exitIfErrors() once.