public class ConstraintEvaluator extends java.lang.Object implements IConstraintEvaluator
Modifier and Type | Field and Description |
---|---|
protected IValueExtractor |
extractor1
The value extractor 1.
|
protected IValueExtractor |
extractor2
The value extractor 2.
|
protected IOperator |
operator
The operator.
|
Constructor and Description |
---|
ConstraintEvaluator(IOperator operator,
IValueExtractor extractor1,
IValueExtractor extractor2)
Create a new constraint evaluator.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Test if the evaluator equals an object.
|
boolean |
evaluate(java.lang.Object right,
Tuple left,
IOAVState state)
Evaluate the constraints given the right object, left tuple
(null for alpha nodes) and the state.
|
IValueExtractor |
getExtractor1()
Get the first value extractor.
|
IValueExtractor |
getExtractor2()
Get the second value extractor.
|
AttributeSet |
getIndirectAttributes()
Get the set of indirect attribute types.
|
IOperator |
getOperator()
Get the operator.
|
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.
|
java.lang.String |
toString()
Get the string representation.
|
protected IOperator operator
protected IValueExtractor extractor1
protected IValueExtractor extractor2
public ConstraintEvaluator(IOperator operator, IValueExtractor extractor1, IValueExtractor extractor2)
operator
- The operator.extractor1
- The first extractor.extractor2
- The second extractor.public boolean evaluate(java.lang.Object right, Tuple left, IOAVState state)
evaluate
in interface IConstraintEvaluator
right
- The right input object.left
- The left input tuple.state
- The working memory.public boolean isAffected(int tupleindex, OAVAttributeType attr)
isAffected
in interface IConstraintEvaluator
tupleindex
- The tuple index.attr
- The attribute.public AttributeSet getRelevantAttributes()
getRelevantAttributes
in interface IConstraintEvaluator
public AttributeSet getIndirectAttributes()
getIndirectAttributes
in interface IConstraintEvaluator
public java.lang.String toString()
toString
in class java.lang.Object
public IOperator getOperator()
public IValueExtractor getExtractor1()
public IValueExtractor getExtractor2()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object