public final class UnaryMaskedTupleMemory extends MaskedTupleMemory
Modifier and Type | Field and Description |
---|---|
protected IMultiLookup<java.lang.Object,Tuple> |
columnToTuples |
protected int |
keyPosition |
mask, owner
Modifier and Type | Method and Description |
---|---|
boolean |
add(Tuple tuple)
Adds a tuple occurrence to the memory
|
boolean |
add(Tuple tuple,
Tuple signature)
Adds a tuple occurrence to the memory, with given signature
|
protected boolean |
addInternal(Tuple tuple,
java.lang.Object key) |
void |
clear()
Clear all partial matchings stored in memory
|
java.util.Collection<Tuple> |
get(ITuple signature)
Retrieves tuples that have the specified signature
|
int |
getKeysetSize() |
java.lang.Iterable<Tuple> |
getSignatures()
Retrieves a read-only view of exactly those signatures for which at least one tuple is stored
|
int |
getTotalSize() |
java.util.Iterator<Tuple> |
iterator()
Iterates over distinct tuples stored in the memory, regardless of their signatures.
|
boolean |
remove(Tuple tuple)
Removes a tuple occurrence from the memory
|
boolean |
remove(Tuple tuple,
Tuple signature)
Removes a tuple occurrence from the memory, with given signature
|
protected boolean |
removeInternal(Tuple tuple,
java.lang.Object key) |
create, getMask, getOrEmpty, getOwner, raiseDuplicateDeletion, raiseDuplicateInsertion, toString
protected IMultiLookup<java.lang.Object,Tuple> columnToTuples
protected final int keyPosition
public void clear()
Clearable
public int getKeysetSize()
getKeysetSize
in class MaskedTupleMemory
public int getTotalSize()
getTotalSize
in class MaskedTupleMemory
This is currently not cached but computed on demand. It is therefore not efficient, and shall only be used for debug / profiling purposes.
public java.util.Iterator<Tuple> iterator()
MaskedTupleMemory
iterator
in interface java.lang.Iterable<Tuple>
iterator
in class MaskedTupleMemory
public java.lang.Iterable<Tuple> getSignatures()
MaskedTupleMemory
getSignatures
in class MaskedTupleMemory
public java.util.Collection<Tuple> get(ITuple signature)
MaskedTupleMemory
get
in class MaskedTupleMemory
public boolean remove(Tuple tuple, Tuple signature)
MaskedTupleMemory
remove
in class MaskedTupleMemory
tuple
- old tuple removed from the memorysignature
- precomputed footprint of the tuple according to the maskpublic boolean remove(Tuple tuple)
MaskedTupleMemory
remove
in class MaskedTupleMemory
tuple
- old tuple removed from the memorypublic boolean add(Tuple tuple, Tuple signature)
MaskedTupleMemory
add
in class MaskedTupleMemory
tuple
- new tuple added to the memorysignature
- precomputed footprint of the tuple according to the maskpublic boolean add(Tuple tuple)
MaskedTupleMemory
add
in class MaskedTupleMemory
tuple
- new tuple added to the memoryprotected boolean addInternal(Tuple tuple, java.lang.Object key)
protected boolean removeInternal(Tuple tuple, java.lang.Object key)