ec.rule
Class RuleConstraints

java.lang.Object
  |
  +--ec.rule.RuleConstraints
All Implemented Interfaces:
Clique, java.io.Serializable, Setup

public class RuleConstraints
extends java.lang.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
static java.util.Hashtable all
          A repository of all the RuleConstraints in the system.
 byte constraintNumber
          The byte value of the constraints -- we can only have 256 of them
static RuleConstraints[] constraints
           
 java.lang.String name
          The name of the RuleConstraints object
static byte numConstraints
           
static java.lang.String P_NAME
           
static java.lang.String P_SIZE
           
static int SIZE_OF_BYTE
           
 
Constructor Summary
RuleConstraints()
           
 
Method Summary
static RuleConstraints constraintsFor(java.lang.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.
static void setupConstraints(EvolutionState state, Parameter base)
          Sets up all the RuleConstraints, loading them from the parameter file.
 java.lang.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 Detail

SIZE_OF_BYTE

public static final int SIZE_OF_BYTE

P_NAME

public static final java.lang.String P_NAME

P_SIZE

public static final java.lang.String P_SIZE

constraintNumber

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

name

public java.lang.String name
The name of the RuleConstraints object

all

public static java.util.Hashtable all
A repository of all the RuleConstraints in the system.

constraints

public static RuleConstraints[] constraints

numConstraints

public static byte numConstraints
Constructor Detail

RuleConstraints

public RuleConstraints()
Method Detail

toString

public java.lang.String toString()
Converting the rule to a string ( the name )
Overrides:
toString in class java.lang.Object

setupConstraints

public static void setupConstraints(EvolutionState state,
                                    Parameter base)
Sets up all the RuleConstraints, loading them from the parameter file. This must be called before anything is called which refers to a type by name.

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(java.lang.String constraintsName,
                                             EvolutionState state)
You must guarantee that after calling constraintsFor(...) one or several times, you call state.output.exitIfErrors() once.