org.drools.spi
Interface Tuple

All Known Implementing Classes:
MockTuple, ReteTuple

public interface Tuple

A mapping of Declaration s to current fact values.

Author:
bob mcwhirter
See Also:
Declaration

Method Summary
 Object get(Declaration declaration)
          Retrieve the value bound to a particular Declaration.
 FactHandle getFactHandleForObject(Object object)
          Retrieve the FactHandle for a given object.
 long getLeastRecentFactTimeStamp()
           
 long getMostRecentFactTimeStamp()
           
 WorkingMemory getWorkingMemory()
          Returns a reference to the WorkingMemory associated with this object.
 

Method Detail

get

public Object get(Declaration declaration)
Retrieve the value bound to a particular Declaration.

Parameters:
declaration - The Declaration key.
Returns:
The currently bound Object value.

getFactHandleForObject

public FactHandle getFactHandleForObject(Object object)
Retrieve the FactHandle for a given object.

Within a consequence of a rule, if the desire is to retract or modify a root fact this method provides a way to retrieve the FactHandle. Facts that are not root fact objects have no handle.

Parameters:
object - The object.
Returns:
The fact-handle or null if the supplied object is not a root fact object.

getWorkingMemory

public WorkingMemory getWorkingMemory()
Returns a reference to the WorkingMemory associated with this object.

Returns:
WorkingMemory

getMostRecentFactTimeStamp

public long getMostRecentFactTimeStamp()

getLeastRecentFactTimeStamp

public long getLeastRecentFactTimeStamp()


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