Class ChainedExtractor
- java.lang.Object
-
- jadex.rules.rulesystem.rete.extractors.ChainedExtractor
-
- All Implemented Interfaces:
IValueExtractor
public class ChainedExtractor extends java.lang.Object implements IValueExtractor
Extractor for chained expressions (e.g. obj1.attr1.attr2)
-
-
Field Summary
Fields Modifier and Type Field Description protected IValueExtractor[]extractorsThe value extractors.
-
Constructor Summary
Constructors Constructor Description ChainedExtractor(IValueExtractor[] extractors)Create a new extractor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)Test for equality.IValueExtractor[]getExtractors()Get the extractors.AttributeSetgetIndirectAttributes()Get the set of relevant attribute types.AttributeSetgetRelevantAttributes()Get the set of relevant attribute types.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
-
extractors
protected IValueExtractor[] extractors
The value extractors.
-
-
Constructor Detail
-
ChainedExtractor
public ChainedExtractor(IValueExtractor[] extractors)
Create a new extractor.
-
-
Method Detail
-
getValue
public 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 interfaceIValueExtractor- 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.
-
isAffected
public boolean isAffected(int tupleindex, OAVAttributeType attr)Test if a constraint evaluator is affected from a change of a certain attribute.- Specified by:
isAffectedin interfaceIValueExtractor- Parameters:
tupleindex- The tuple index.attr- The attribute.- Returns:
- True, if affected.
-
toString
public java.lang.String toString()
Get the string representation.- Overrides:
toStringin classjava.lang.Object- Returns:
- The string representation.
-
getRelevantAttributes
public AttributeSet getRelevantAttributes()
Get the set of relevant attribute types.- Specified by:
getRelevantAttributesin interfaceIValueExtractor- Returns:
- The relevant attribute types.
-
getIndirectAttributes
public AttributeSet getIndirectAttributes()
Get the set of relevant attribute types.- Specified by:
getIndirectAttributesin interfaceIValueExtractor- Returns:
- The relevant attribute types.
-
hashCode
public int hashCode()
The hash code.- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
Test for equality.- Overrides:
equalsin classjava.lang.Object
-
getExtractors
public IValueExtractor[] getExtractors()
Get the extractors.- Returns:
- The extractors.
-
-