public class CollectMemory
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.util.Set |
resultmem
The result memory.
|
protected java.util.Map |
workingmem
The working memory (index tuple -> result tuple).
|
Constructor and Description |
---|
CollectMemory() |
Modifier and Type | Method and Description |
---|---|
boolean |
addResultTuple(Tuple tuple)
Add a tuple to the result.
|
java.util.Collection |
getResultMemory()
Get the result memory.
|
java.util.Map |
getWorkingMemory()
Get the result memory.
|
Tuple |
getWorkingTuple(Tuple key)
Add a tuple to the result.
|
void |
putWorkingTuple(Tuple key,
Tuple result)
Add a tuple to the result.
|
boolean |
removeResultTuple(Tuple tuple)
Remove from the result.
|
void |
removeWorkingTuple(Tuple key)
Remove from the result.
|
boolean |
resultMemoryContains(Tuple tuple)
Test if tuple is contained in result memory.
|
int |
size()
Get the size of the beta memory (including indexed memories).
|
java.lang.String |
toString()
Get the string representation.
|
protected java.util.Map workingmem
protected java.util.Set resultmem
public boolean addResultTuple(Tuple tuple)
tuple
- The result node.public boolean removeResultTuple(Tuple tuple)
tuple
- The tuple.public boolean resultMemoryContains(Tuple tuple)
tuple
- The tuple.public java.util.Collection getResultMemory()
public void putWorkingTuple(Tuple key, Tuple result)
tuple
- The result node.public Tuple getWorkingTuple(Tuple key)
tuple
- The result node.public void removeWorkingTuple(Tuple key)
tuple
- The tuple.public java.util.Map getWorkingMemory()
public int size()
public java.lang.String toString()
toString
in class java.lang.Object