org.drools.spi
Class MockTuple
java.lang.Object
org.drools.spi.MockTuple
- All Implemented Interfaces:
- Tuple
- public class MockTuple
- extends java.lang.Object
- implements Tuple
-
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MockTuple
public MockTuple()
get
public java.lang.Object get(Declaration declaration)
- Description copied from interface:
Tuple
- Retrieve the value bound to a particular
Declaration
.
- Specified by:
get
in interface Tuple
- Parameters:
declaration
- The Declaration
key.
- Returns:
- The currently bound
Object
value.
put
public void put(Declaration declaration,
java.lang.Object value)
getDeclarations
public java.util.Set getDeclarations()
getFactHandleForObject
public FactHandle getFactHandleForObject(java.lang.Object object)
- Description copied from interface:
Tuple
- 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.
- Specified by:
getFactHandleForObject
in interface Tuple
- Parameters:
object
- The object.
- Returns:
- The fact-handle or
null
if the supplied object is
not a root fact object.
setRule
public void setRule(Rule rule)
getRule
public Rule getRule()
setWorkingMemory
public void setWorkingMemory(WorkingMemory workingMemory)
getWorkingMemory
public WorkingMemory getWorkingMemory()
- Description copied from interface:
Tuple
- Returns a reference to the
WorkingMemory
associated with
this object.
- Specified by:
getWorkingMemory
in interface Tuple
- Returns:
- WorkingMemory
setMostRecentFactTimeStamp
public void setMostRecentFactTimeStamp(long timeStamp)
setLeastRecentFactTimeStamp
public void setLeastRecentFactTimeStamp(long timeStamp)
setConditionTimeStamps
public void setConditionTimeStamps(long[] timeStamps)
getMostRecentFactTimeStamp
public long getMostRecentFactTimeStamp()
- Specified by:
getMostRecentFactTimeStamp
in interface Tuple
getLeastRecentFactTimeStamp
public long getLeastRecentFactTimeStamp()
- Specified by:
getLeastRecentFactTimeStamp
in interface Tuple
setConditionTimeStamp
public void setConditionTimeStamp(int order,
long timeStamp)
getConditionTimeStamp
public long getConditionTimeStamp(int order)
getConditionTimeStamps
public long[] getConditionTimeStamps()