public final class NullaryMaskedTupleMemory extends AbstractSetBackedMaskedTupleMemory
Modifier and Type | Field and Description |
---|---|
protected static java.util.Set<Tuple> |
EMPTY_RELATION |
protected static java.util.Set<Tuple> |
UNIT_RELATION |
tuples
mask, owner
Constructor and Description |
---|
NullaryMaskedTupleMemory(TupleMask mask,
CollectionsFactory.MemoryType bucketType,
java.lang.Object 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
|
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
|
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
|
clear, getTotalSize, iterator
create, getMask, getOrEmpty, getOwner, raiseDuplicateDeletion, raiseDuplicateInsertion, toString
protected static final java.util.Set<Tuple> UNIT_RELATION
protected static final java.util.Set<Tuple> EMPTY_RELATION
public NullaryMaskedTupleMemory(TupleMask mask, CollectionsFactory.MemoryType bucketType, java.lang.Object owner)
mask
- The mask used to index the matchingsowner
- the object "owning" this memorybucketType
- the kind of tuple collection maintained for each indexer bucketpublic int getKeysetSize()
getKeysetSize
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 memory