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:
  - Serialized Form

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `byte`
  `constraintNumber`
  The byte value of the constraints -- we can only have 256 of them
  `String`
  `name`
  The name of the RuleConstraints object
  `static final String`
  `P_NAME`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `RuleConstraints()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static RuleConstraints`
  `constraintsFor(String constraintsName, EvolutionState state)`
  You must guarantee that after calling constraintsFor(...) one or several times, you call state.output.exitIfErrors() once.
  `void`
  `setup(EvolutionState state, Parameter base)`
  Sets up the object by reading it from the parameters stored in state, built off of the parameter base base.
  `String`
  `toString()`
  Converting the rule to a string ( the name )

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### P_NAME

    public static final String P_NAME
    See Also:
      - Constant Field Values

  - ### 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.