public class ConstraintIndexer
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected IValueExtractor |
extractor1
The value extractor 1 (left).
|
protected IValueExtractor |
extractor2
The value extractor 2 (right).
|
Constructor and Description |
---|
ConstraintIndexer(IValueExtractor extractor1,
IValueExtractor extractor2)
Create a new indexed constraint evaluator.
|
Modifier and Type | Method and Description |
---|---|
void |
addObject(java.lang.Object right,
IOAVState state,
BetaMemory bmem)
Add an object to the memory.
|
void |
addTuple(Tuple left,
IOAVState state,
BetaMemory bmem)
Add a tuple to the memory.
|
boolean |
equals(java.lang.Object obj)
Test if the evaluator equals an object.
|
java.util.Set |
findObjects(Tuple left,
BetaMemory bmem)
Find all objects for a tuple.
|
java.util.Set |
findTuples(java.lang.Object right,
BetaMemory bmem)
Find all tuples for an object.
|
AttributeSet |
getIndirectAttributes()
Get the set of indirect attribute types.
|
AttributeSet |
getRelevantAttributes()
Get the set of relevant attribute types.
|
int |
hashCode()
Get the hash code.
|
boolean |
isAffected(int tupleindex,
OAVAttributeType attr)
Test if a constraint evaluator is affected from a
change of a certain attribute.
|
boolean |
isLeftIndex(int tupleindex,
OAVAttributeType type)
Test if the indexer uses the given index and attribute type for
left side indexing.
|
boolean |
isRightIndex(OAVAttributeType type)
Test if the indexer uses the given attribute type for
right side indexing.
|
void |
removeObject(java.lang.Object right,
BetaMemory bmem)
Remove an object from the memory.
|
void |
removeTuple(Tuple left,
BetaMemory bmem)
Remove a tuple from the memory.
|
java.lang.String |
toString()
Create a string representation.
|
protected IValueExtractor extractor1
protected IValueExtractor extractor2
public ConstraintIndexer(IValueExtractor extractor1, IValueExtractor extractor2)
public java.util.Set findObjects(Tuple left, BetaMemory bmem)
left
- The tuple.bmem
- The beta memory.public java.util.Set findTuples(java.lang.Object right, BetaMemory bmem)
right
- The object.bmem
- The beta memory.public void addObject(java.lang.Object right, IOAVState state, BetaMemory bmem)
right
- The object.state
- The state.bmem
- The beta memory.public void addTuple(Tuple left, IOAVState state, BetaMemory bmem)
left
- The tuple.state
- The state.bmem
- The beta memory.public void removeObject(java.lang.Object right, BetaMemory bmem)
right
- The object.bmem
- The beta memory.public void removeTuple(Tuple left, BetaMemory bmem)
left
- The tuple.bmem
- The beta memory.public boolean isRightIndex(OAVAttributeType type)
public boolean isLeftIndex(int tupleindex, OAVAttributeType type)
public boolean isAffected(int tupleindex, OAVAttributeType attr)
tupleindex
- The tuple index.attr
- The attribute.public AttributeSet getRelevantAttributes()
public AttributeSet getIndirectAttributes()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object