public interface Evaluator extends Serializable, org.kie.api.runtime.rule.Evaluator
Modifier and Type | Method and Description |
---|---|
boolean |
evaluate(InternalWorkingMemory workingMemory,
InternalReadAccessor extractor,
InternalFactHandle factHandle,
FieldValue value)
Evaluates the expression using the provided parameters.
|
boolean |
evaluate(InternalWorkingMemory workingMemory,
InternalReadAccessor leftExtractor,
InternalFactHandle left,
InternalReadAccessor rightExtractor,
InternalFactHandle right)
Evaluates the expression using the provided parameters.
|
boolean |
evaluateCachedLeft(InternalWorkingMemory workingMemory,
VariableRestriction.VariableContextEntry context,
InternalFactHandle right)
Evaluates the expression using the provided parameters.
|
boolean |
evaluateCachedRight(InternalWorkingMemory workingMemory,
VariableRestriction.VariableContextEntry context,
InternalFactHandle 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.kie.api.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.
|
ValueType getValueType()
org.kie.api.runtime.rule.Operator getOperator()
getOperator
in interface org.kie.api.runtime.rule.Evaluator
ValueType getCoercedValueType()
boolean evaluate(InternalWorkingMemory workingMemory, InternalReadAccessor extractor, InternalFactHandle factHandle, FieldValue value)
workingMemory
- The current working memoryextractor
- The extractor used to get the field value from the objectfactHandle
- 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, InternalFactHandle left, InternalReadAccessor rightExtractor, InternalFactHandle 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, InternalFactHandle 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, InternalFactHandle 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.kie.api.runtime.rule.Evaluator
Interval getInterval()
Copyright © 2001–2016 JBoss by Red Hat. All rights reserved.