| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<Tuple,java.lang.Integer> |
occurrences
Counts the number of occurrences of each pattern.
|
| Constructor and Description |
|---|
TupleMemory() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(Tuple ps)
Adds one tuple occurrence to the memory.
|
boolean |
add(Tuple ps,
int count)
Adds the given number of tuple occurrences to the memory.
|
boolean |
addAll(java.util.Collection<? extends Tuple> arg0) |
void |
clear()
Clear all partial matchings stored in memory
|
void |
clear(Tuple ps)
Removes all occurrences of the given tuple from the memory.
|
boolean |
contains(java.lang.Object arg) |
boolean |
containsAll(java.util.Collection<?> arg0) |
boolean |
demandAdd(Tuple ps)
Adds one tuple occurrence to the memory if the tuple was already contained in the memory.
|
boolean |
demandAdd(Tuple ps,
int count)
Adds the given number of tuple occurrences to the memory if the tuple was already contained in the memory.
|
int |
get(Tuple ps)
Returns the number of occurrences of the given tuple.
|
boolean |
isEmpty() |
java.util.Iterator<Tuple> |
iterator() |
boolean |
remove(java.lang.Object arg0) |
boolean |
remove(Tuple ps)
Removes one occurrence of the given tuple from the memory
|
boolean |
removeAll(java.util.Collection<?> arg0) |
boolean |
retainAll(java.util.Collection<?> arg0) |
int |
size() |
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] arg0) |
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitprotected java.util.Map<Tuple,java.lang.Integer> occurrences
public int get(Tuple ps)
ps - the tuplepublic boolean add(Tuple ps)
add in interface java.util.Collection<Tuple>ps - the tuplepublic boolean add(Tuple ps, int count)
ps - the tuplecount - the number of occurrencespublic boolean demandAdd(Tuple ps)
ps - the tuplepublic boolean demandAdd(Tuple ps, int count)
ps - the tuplecount - the number of occurrencespublic boolean remove(Tuple ps)
public void clear(Tuple ps)
ps - the tuple to removepublic void clear()
Clearablepublic java.util.Iterator<Tuple> iterator()
public boolean addAll(java.util.Collection<? extends Tuple> arg0)
addAll in interface java.util.Collection<Tuple>public boolean contains(java.lang.Object arg)
contains in interface java.util.Collection<Tuple>public boolean containsAll(java.util.Collection<?> arg0)
containsAll in interface java.util.Collection<Tuple>public boolean isEmpty()
isEmpty in interface java.util.Collection<Tuple>public boolean remove(java.lang.Object arg0)
remove in interface java.util.Collection<Tuple>public boolean removeAll(java.util.Collection<?> arg0)
removeAll in interface java.util.Collection<Tuple>public boolean retainAll(java.util.Collection<?> arg0)
retainAll in interface java.util.Collection<Tuple>public int size()
size in interface java.util.Collection<Tuple>public java.lang.Object[] toArray()
toArray in interface java.util.Collection<Tuple>public <T> T[] toArray(T[] arg0)
toArray in interface java.util.Collection<Tuple>public java.lang.String toString()
toString in class java.lang.Object