|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Evaluator
A public interface to be implemented by all evaluators
Method Summary | |
---|---|
boolean |
evaluate(InternalWorkingMemory workingMemory,
InternalReadAccessor extractor,
Object object,
FieldValue value)
Evaluates the expression using the provided parameters. |
boolean |
evaluate(InternalWorkingMemory workingMemory,
InternalReadAccessor leftExtractor,
Object left,
InternalReadAccessor rightExtractor,
Object right)
Evaluates the expression using the provided parameters. |
boolean |
evaluateCachedLeft(InternalWorkingMemory workingMemory,
VariableRestriction.VariableContextEntry context,
Object right)
Evaluates the expression using the provided parameters. |
boolean |
evaluateCachedRight(InternalWorkingMemory workingMemory,
VariableRestriction.VariableContextEntry context,
Object left)
Evaluates the expression using the provided parameters. |
ValueType |
getCoercedValueType()
Returns the value type this evaluator will coerce operands to, during evaluation. |
Interval |
getInterval()
In case this is a temporal evaluator, returns the interval in which this evaluator may match the target fact |
org.drools.runtime.rule.Operator |
getOperator()
Returns the operator representation object for this evaluator |
ValueType |
getValueType()
Returns the type of the values this evaluator operates upon. |
boolean |
isTemporal()
Returns true if this evaluator implements a temporal evaluation, i.e., a time sensitive evaluation whose properties of matching only events within an specific time interval can be used for determining event expirations automatically. |
Object |
prepareLeftObject(InternalFactHandle handle)
There are evaluators that operate on fact attributes, there are evaluators that operate on fact handle attributes (metadata), and there are evaluators that can operate in either one. |
Object |
prepareRightObject(InternalFactHandle handle)
There are evaluators that operate on fact attributes, there are evaluators that operate on fact handle attributes (metadata), and there are evaluators that can operate in either one. |
Method Detail |
---|
ValueType getValueType()
org.drools.runtime.rule.Operator getOperator()
getOperator
in interface org.drools.runtime.rule.Evaluator
ValueType getCoercedValueType()
Object prepareLeftObject(InternalFactHandle handle)
handle
-
Object prepareRightObject(InternalFactHandle handle)
handle
-
boolean evaluate(InternalWorkingMemory workingMemory, InternalReadAccessor extractor, Object object, FieldValue value)
workingMemory
- The current working memoryextractor
- The extractor used to get the field value from the objectobject
- The source object to evaluate, i.e., the factvalue
- The actual value to compare to, i.e., the constant value.
boolean evaluate(InternalWorkingMemory workingMemory, InternalReadAccessor leftExtractor, Object left, InternalReadAccessor rightExtractor, Object right)
workingMemory
- The current working memoryleftExtractor
- The extractor to read the left value. In the above example,
the "$someName" variable value.left
- The source object from where the value of the variable is
extracted.rightExtractor
- The extractor to read the right value. In the above example,
the "name" attribute value.right
- The right object from where to extract the value. In the
above example, that is the "Person" instance from where to
extract the "name" attribute.
boolean evaluateCachedLeft(InternalWorkingMemory workingMemory, VariableRestriction.VariableContextEntry context, Object right)
workingMemory
- The current working memorycontext
- The previously cached context, including the left value
and the extractor for the right value.right
- The right object, from where to extract the value. In the
above example, that is the "Person" instance from where to
extract the "name" attribute.
boolean evaluateCachedRight(InternalWorkingMemory workingMemory, VariableRestriction.VariableContextEntry context, Object left)
workingMemory
- The current working memorycontext
- The previously cached context, including the right value
and the extractor for the left value.left
- The left object, from where to extract the bound variable.
In the above example, that is the "$someName" variable value.
boolean isTemporal()
isTemporal
in interface org.drools.runtime.rule.Evaluator
Interval getInterval()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |