org.jscience.computing.ai.expertsystem
Class RuleEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.jscience.computing.ai.expertsystem.RuleEvent
All Implemented Interfaces:
java.io.Serializable

public class RuleEvent
extends java.util.EventObject

A semantic event that indicates that a rule was fired.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
RuleEvent(AbstractKnowledgeBase source, int ruleIndex)
          Class constructor.
 
Method Summary
 AbstractKnowledgeBase getKnowledgeBase()
          Returns the knowledge base that fired the rule.
 int getRuleIndex()
          Returns the index of the fired rule.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RuleEvent

public RuleEvent(AbstractKnowledgeBase source,
                 int ruleIndex)
Class constructor.

Parameters:
source - the knowledge base that fired the rule.
ruleIndex - the index of the fired rule.
Method Detail

getKnowledgeBase

public AbstractKnowledgeBase getKnowledgeBase()
Returns the knowledge base that fired the rule.

Returns:
the knowledge base that fired the rule.

getRuleIndex

public int getRuleIndex()
Returns the index of the fired rule.

Returns:
the index of the fired rule.