org.drools.reteoo
Class Rete

java.lang.Object
  extended by org.drools.reteoo.Rete
All Implemented Interfaces:
Serializable

 class Rete
extends Object
implements Serializable

The Rete-OO network. This node accepts an Object, and simply propagates it to all ObjectTypeNode s for type testings.

Author:
bob mcwhirter
See Also:
ObjectTypeNode

Constructor Summary
Rete()
          Construct.
 
Method Summary
(package private)  void addObjectTypeNode(ObjectTypeNode node)
          Add an ObjectTypeNode child to this Rete.
(package private)  void assertObject(FactHandle handle, Object object, WorkingMemoryImpl workingMemory)
          Assert a new fact object into this RuleBase and the specified WorkingMemory.
(package private)  ObjectTypeNode getObjectTypeNode(ObjectType objectType)
          Retrieve an ObjectTypeNode keyed by ObjectType.
(package private)  Iterator getObjectTypeNodeIterator()
          Retrieve an Iterator over the ObjectTypeNode children of this node.
(package private)  Collection getObjectTypeNodes()
          Retrieve all ObjectTypeNode children of this node.
(package private)  ObjectTypeNode getOrCreateObjectTypeNode(ObjectType objectType)
          Retrieve an ObjectTypeNode keyed by ObjectType, creating one, if necessary.
(package private)  void retractObject(FactHandle handle, WorkingMemoryImpl workingMemory)
          Retract a fact object from this RuleBase and the specified WorkingMemory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Rete

public Rete()
Construct.

Method Detail

assertObject

void assertObject(FactHandle handle,
                  Object object,
                  WorkingMemoryImpl workingMemory)
            throws FactException
Assert a new fact object into this RuleBase and the specified WorkingMemory.

Parameters:
handle - The fact handle.
object - The object to assert.
workingMemory - The working memory session.
Throws:
FactException - if an error occurs during assertion.

retractObject

void retractObject(FactHandle handle,
                   WorkingMemoryImpl workingMemory)
             throws FactException
Retract a fact object from this RuleBase and the specified WorkingMemory.

Parameters:
handle - The handle of the fact to retract.
workingMemory - The working memory session.
Throws:
FactException - if an error occurs during retraction.

addObjectTypeNode

void addObjectTypeNode(ObjectTypeNode node)
Add an ObjectTypeNode child to this Rete.

Parameters:
node - The node to add.

getObjectTypeNodes

Collection getObjectTypeNodes()
Retrieve all ObjectTypeNode children of this node.

Returns:
The Set of ObjectTypeNodes.

getObjectTypeNodeIterator

Iterator getObjectTypeNodeIterator()
Retrieve an Iterator over the ObjectTypeNode children of this node.

Returns:
An Iterator over ObjectTypeNodes.

getObjectTypeNode

ObjectTypeNode getObjectTypeNode(ObjectType objectType)
Retrieve an ObjectTypeNode keyed by ObjectType.

Parameters:
objectType - The ObjectType key.
Returns:
The matching ObjectTypeNode if one has already been created, else null.

getOrCreateObjectTypeNode

ObjectTypeNode getOrCreateObjectTypeNode(ObjectType objectType)
Retrieve an ObjectTypeNode keyed by ObjectType, creating one, if necessary.

Parameters:
objectType - The ObjectType key.
Returns:
The matching ObjectTypeNode.


Copyright © 2001-2005 The Codehaus. All Rights Reserved.