org.sazonov.fuzzy.engine
Class RuleBlock

java.lang.Object
  extended byorg.sazonov.fuzzy.engine.RuleBlock

public class RuleBlock
extends java.lang.Object

Class for a block of fuzzy rules

Version:
2000 Original, v0.1, Edward S. Sazonov (esazonov@usa.com), 12/19/2003 Modifications, v0.2, Nazario Irizarry (naz-irizarry@excite.com)
Author:
Edward Sazonov

Method Summary
 void executeRules()
          Evaluates this block.
 void executeRules(java.io.PrintWriter out)
          Evaluates this block.
 java.lang.String getDescription()
          This method is a start (albeit trivial) to move towards JSR94
 FuzzyState getFuzzyState()
           
 java.lang.String getName()
          This method is a start (albeit trivial) to move towards JSR94
 java.util.List getRules()
          This method is a start (albeit trivial) to move towards JSR94
 boolean hasRuleFired()
          Returns true if any rule in the block has fired during a call to evaluateBlock() or evaluateBlockText().
 void setDescription(java.lang.String description)
          Set description
 void setName(java.lang.String name)
          Set its name
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getFuzzyState

public FuzzyState getFuzzyState()

executeRules

public void executeRules()
                  throws EvaluationException
Evaluates this block.

Throws:
EvaluationException

executeRules

public void executeRules(java.io.PrintWriter out)
                  throws EvaluationException
Evaluates this block. If the parameter is not null it is used to write evaluation restuls for every expression in the rule.

Parameters:
out - is the writer to write a "list" of rule fireings, it can be null
Throws:
EvaluationException

hasRuleFired

public boolean hasRuleFired()
Returns true if any rule in the block has fired during a call to evaluateBlock() or evaluateBlockText().

Returns:
boolean

getRules

public java.util.List getRules()
This method is a start (albeit trivial) to move towards JSR94

Returns:
a List of the rules in this block

getName

public java.lang.String getName()
This method is a start (albeit trivial) to move towards JSR94

Returns:
the name of this block of rules

getDescription

public java.lang.String getDescription()
This method is a start (albeit trivial) to move towards JSR94

Returns:
the description of this block of rules

setName

public void setName(java.lang.String name)
Set its name


setDescription

public void setDescription(java.lang.String description)
Set description