org.jscience.computing.ai.expertsystem.rete
Class ClassFilterReteNode

java.lang.Object
  extended by org.jscience.computing.ai.expertsystem.rete.ReteNode
      extended by org.jscience.computing.ai.expertsystem.rete.ClassFilterReteNode

public class ClassFilterReteNode
extends ReteNode

A node in the Rete network that is activated if the object belongs to the class it represents. An object of this class is the entry point of the Rete network.


Constructor Summary
ClassFilterReteNode(java.lang.Class classType)
          Class constructor.
 
Method Summary
 java.util.List getClassFilterSuccessors()
          Returns the successors of this node.
 java.lang.Class getClassType()
          Returns the class object associated with this node.
 void newObject(java.lang.Object obj)
          Informs this node that an object has arrived.
 void newObject(java.lang.Object obj, int input)
          Informs this node that an object has arrived.
 java.lang.String toString()
          Returns a string representation of this object.
 
Methods inherited from class org.jscience.computing.ai.expertsystem.rete.ReteNode
addSuccessor, addSuccessor, addSuccessor, getNumberInputs, getNumberOutputs, getSuccessors, propagate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClassFilterReteNode

public ClassFilterReteNode(java.lang.Class classType)
Class constructor.

Parameters:
classType - the class object that indicates which tokens can pass by this node.
Method Detail

getClassType

public java.lang.Class getClassType()
Returns the class object associated with this node.

Returns:
the class object associated with this node.

newObject

public void newObject(java.lang.Object obj)
Informs this node that an object has arrived. As the type check of the objects is being performed at the knowledge base, we will assume that this kind of node will always propagate the objects that arrive at it.

Parameters:
obj - the object that arrived at this node.

newObject

public void newObject(java.lang.Object obj,
                      int input)
Informs this node that an object has arrived. As the type check of the objects is being performed at the knowledge base, we will assume that this kind of node will always propagate the objects that arrive at it.

Specified by:
newObject in class ReteNode
Parameters:
obj - the object that arrived at this node.
input - DOCUMENT ME!

toString

public java.lang.String toString()
Returns a string representation of this object. Useful for debugging.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of this object.

getClassFilterSuccessors

public java.util.List getClassFilterSuccessors()
Returns the successors of this node.

Returns:
the successors of this node.