Class logic.IfThenElse
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class logic.IfThenElse

Object
   |
   +----logic.IfThenElse

public class IfThenElse
extends Object
This is the "rules engine". It evaluates the sequence of conditions that is passed in, looks up the corresponding action in its rules table, and sends a message to that action to execute itself


Constructor Index

 o logic.IfThenElse(Vector, Rules)
The Vector of conditions represent a single specific sequence of conditions we are interested in evaluating and performing an action on The rules are a map that relates each sequence of Booleans to an action that should be fired.

Method Index

 o evaluateConditions(Vector)
This method evaluates each Condition in the Vector argument and loads the resulting Booleans in a Vector that is ultimately returned.
 o executeAction(Vector, Rules)
This method takes the Vector of results obtained from evaluateConditions(..) and wraps it in a BooleanTuple.

Constructors

 o IfThenElse
public IfThenElse(Vector conditions,
                  Rules rules) throws DataNotFoundException, PoorPerformanceException, RuleNotFoundException, InconsistentRulesException
The Vector of conditions represent a single specific sequence of conditions we are interested in evaluating and performing an action on The rules are a map that relates each sequence of Booleans to an action that should be fired.

Methods

 o evaluateConditions
public java.util.Vector evaluateConditions(Vector conditions) throws DataNotFoundException
This method evaluates each Condition in the Vector argument and loads the resulting Booleans in a Vector that is ultimately returned.

 o executeAction
public void executeAction(Vector results,
                          Rules rules) throws PoorPerformanceException, RuleNotFoundException, InconsistentRulesException
This method takes the Vector of results obtained from evaluateConditions(..) and wraps it in a BooleanTuple. The BooleanTuple is looked up on the rules table to obtain the corresponding Action instance. This action instance is then requested to execute.


All Packages  Class Hierarchy  This Package  Previous  Next  Index