org.drools.reteoo
Class AgendaItem

java.lang.Object
  extended by org.drools.reteoo.AgendaItem
All Implemented Interfaces:
Serializable, Activation

 class AgendaItem
extends Object
implements Activation, Serializable

Item entry in the Agenda.

Author:
bob mcwhirter

Constructor Summary
AgendaItem(ReteTuple tuple, Rule rule)
          Construct.
 
Method Summary
(package private)  boolean dependsOn(FactHandle handle)
          Determine if this tuple depends on the values derrived from a particular root object.
(package private)  void fire(WorkingMemoryImpl workingMemory)
          Fire this item.
 long getActivationNumber()
          Retrieve the activation number that was assigned by the counter to his activation at creation time.
(package private)  TupleKey getKey()
          Retrieve the TupleKey.
 Rule getRule()
          Retrieve the rule.
 Tuple getTuple()
          Retrieve the tuple.
(package private)  void setTuple(ReteTuple tuple)
          Set the tuple.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AgendaItem

AgendaItem(ReteTuple tuple,
           Rule rule)
Construct.

Parameters:
tuple - The tuple.
rule - The rule.
Method Detail

getRule

public Rule getRule()
Retrieve the rule.

Specified by:
getRule in interface Activation
Returns:
The rule.

dependsOn

boolean dependsOn(FactHandle handle)
Determine if this tuple depends on the values derrived from a particular root object.

Parameters:
handle - The root object handle.
Returns:
true if this agenda item depends upon the item, otherwise false.

setTuple

void setTuple(ReteTuple tuple)
Set the tuple.

Parameters:
tuple - The tuple.

getTuple

public Tuple getTuple()
Retrieve the tuple.

Specified by:
getTuple in interface Activation
Returns:
The tuple.

getKey

TupleKey getKey()
Retrieve the TupleKey.

Returns:
The key to the tuple in this item.

fire

void fire(WorkingMemoryImpl workingMemory)
    throws ConsequenceException
Fire this item.

Parameters:
workingMemory - The working memory context.
Throws:
ConsequenceException - If an error occurs while attempting to fire the consequence.

getActivationNumber

public long getActivationNumber()
Description copied from interface: Activation
Retrieve the activation number that was assigned by the counter to his activation at creation time.

Specified by:
getActivationNumber in interface Activation
Returns:
The tuple.

toString

public String toString()
Overrides:
toString in class Object


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