org.drools.spi
Interface Tuple


public interface Tuple

A mapping of Declarations to current fact values.

Version:
$Id: Tuple.java,v 1.8 2003/11/19 21:31:12 bob Exp $
Author:
bob mcwhirter
See Also:
Declaration

Method Summary
 java.lang.Object get(Declaration declaration)
          Retrieve the value bound to a particular Declaration.
 java.util.Set getDeclarations()
          Retrieve the Collection of all Declarations active in this tuple.
 FactHandle getFactHandleForObject(java.lang.Object object)
          Retrieve the FactHandle for a given object.
 

Method Detail

get

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

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

getDeclarations

public java.util.Set getDeclarations()
Retrieve the Collection of all Declarations active in this tuple.

Returns:
The Collection of all Declarations in this tuple.

getFactHandleForObject

public FactHandle getFactHandleForObject(java.lang.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.