public class TupleExtractor extends java.lang.Object implements IValueExtractor
Modifier and Type | Field and Description |
---|---|
protected OAVAttributeType |
attr
The attribute type.
|
protected java.lang.Object |
key
The key value.
|
protected int |
tupleindex
The tuple index.
|
Constructor and Description |
---|
TupleExtractor(int tupleindex,
OAVAttributeType attr)
Create a new extractor.
|
TupleExtractor(int tupleindex,
OAVAttributeType attr,
java.lang.Object key)
Create a new extractor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Test for equality.
|
OAVAttributeType |
getAttribute()
Get the attribute.
|
AttributeSet |
getIndirectAttributes()
Get the set of indirect attribute types.
|
AttributeSet |
getRelevantAttributes()
Get the set of relevant attribute types.
|
int |
getTupleIndex()
Get the tuple index.
|
java.lang.Object |
getValue(Tuple left,
java.lang.Object right,
java.lang.Object prefix,
IOAVState state)
Get the value of an attribute from an object or tuple.
|
int |
hashCode()
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 int tupleindex
protected OAVAttributeType attr
protected java.lang.Object key
public TupleExtractor(int tupleindex, OAVAttributeType attr)
public TupleExtractor(int tupleindex, OAVAttributeType attr, java.lang.Object key)
public java.lang.Object getValue(Tuple left, java.lang.Object right, java.lang.Object prefix, IOAVState state)
getValue
in interface IValueExtractor
left
- The left input tuple.right
- The right input object.prefix
- The prefix input object (last value from previous extractor in a chain).state
- The working memory.public boolean isAffected(int tupleindex, OAVAttributeType attr)
isAffected
in interface IValueExtractor
tupleindex
- The tuple index.attr
- The attribute.public OAVAttributeType getAttribute()
public AttributeSet getRelevantAttributes()
getRelevantAttributes
in interface IValueExtractor
public AttributeSet getIndirectAttributes()
getIndirectAttributes
in interface IValueExtractor
public int getTupleIndex()
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object