All Packages Class Hierarchy This Package Previous Next Index
Class logic.IfThenElse
java.lang.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
-
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.
-
evaluateConditions(Vector)
- This method evaluates each Condition in the Vector argument and
loads the resulting Booleans in a Vector that is ultimately returned.
-
executeAction(Vector, Rules)
- This method takes the Vector of results obtained from evaluateConditions(..)
and wraps it in a BooleanTuple.
IfThenElse
public IfThenElse(Vector conditions,
Rules rules) throws DataNotFoundException, NestingTooDeepException, RuleNotFoundException
- 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.
evaluateConditions
public 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.
executeAction
public void executeAction(Vector results,
Rules rules) throws NestingTooDeepException, RuleNotFoundException
- 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