Class MultifieldExtractor
- java.lang.Object
- 
- jadex.rules.rulesystem.rete.extractors.MultifieldExtractor
 
- 
- All Implemented Interfaces:
- IValueExtractor
 
 public class MultifieldExtractor extends java.lang.Object implements IValueExtractor A multifield extractor has the purpose of extracting a value or a collection of values from a collection type attribute.
- 
- 
Field SummaryFields Modifier and Type Field Description protected OAVAttributeTypeattrThe attribute.protected intsubindexThe subindex.protected inttupleindexThe tupleindex.
 - 
Constructor SummaryConstructors Constructor Description MultifieldExtractor(int tupleindex, OAVAttributeType attr, int subindex)Create a new extractor.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)Test for equality.OAVAttributeTypegetAttribute()Get the attribute.AttributeSetgetIndirectAttributes()Get the set of indirect attribute types.AttributeSetgetRelevantAttributes()Get the set of relevant attribute types.intgetSubindex()Get the sub index.intgetTupleIndex()Get the tuple index.java.lang.ObjectgetValue(Tuple left, java.lang.Object right, java.lang.Object prefix, IOAVState state)Get the value of an attribute from an object or tuple.inthashCode()The hash code.booleanisAffected(int tupleindex, OAVAttributeType attr)Test if a constraint evaluator is affected from a change of a certain attribute.java.lang.StringtoString()Get the string representation.
 
- 
- 
- 
Field Detail- 
tupleindexprotected int tupleindex The tupleindex.
 - 
attrprotected OAVAttributeType attr The attribute.
 - 
subindexprotected int subindex The subindex.
 
- 
 - 
Constructor Detail- 
MultifieldExtractorpublic MultifieldExtractor(int tupleindex, OAVAttributeType attr, int subindex)Create a new extractor.
 
- 
 - 
Method Detail- 
getValuepublic 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.- Specified by:
- getValuein interface- IValueExtractor
- Parameters:
- 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.
 
 - 
isAffectedpublic boolean isAffected(int tupleindex, OAVAttributeType attr)Test if a constraint evaluator is affected from a change of a certain attribute.- Specified by:
- isAffectedin interface- IValueExtractor
- Parameters:
- tupleindex- The tuple index.
- attr- The attribute.
- Returns:
- True, if affected.
 
 - 
getRelevantAttributespublic AttributeSet getRelevantAttributes() Get the set of relevant attribute types.- Specified by:
- getRelevantAttributesin interface- IValueExtractor
- Returns:
- The relevant attribute types.
 
 - 
getIndirectAttributespublic AttributeSet getIndirectAttributes() Get the set of indirect attribute types. I.e. attributes of objects, which are not part of an object conditions (e.g. for chained extractors)- Specified by:
- getIndirectAttributesin interface- IValueExtractor
- Returns:
- The relevant attribute types.
 
 - 
toStringpublic java.lang.String toString() Get the string representation.- Overrides:
- toStringin class- java.lang.Object
- Returns:
- The string representation.
 
 - 
getAttributepublic OAVAttributeType getAttribute() Get the attribute.
 - 
getTupleIndexpublic int getTupleIndex() Get the tuple index.
 - 
getSubindexpublic int getSubindex() Get the sub index.
 - 
hashCodepublic int hashCode() The hash code.- Overrides:
- hashCodein class- java.lang.Object
 
 - 
equalspublic boolean equals(java.lang.Object obj) Test for equality.- Overrides:
- equalsin class- java.lang.Object
 
 
- 
 
-