public static class StrEvaluatorDefinition.StrEvaluator extends BaseEvaluator
Constructor and Description |
---|
StrEvaluatorDefinition.StrEvaluator(ValueType type,
boolean isNegated) |
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.
|
StrEvaluatorDefinition.Operations |
getParameter() |
void |
setParameterText(String parameterText) |
String |
toString() |
equals, getCoercedValueType, getInterval, getOperator, getValueType, hashCode, isTemporal, readExternal, writeExternal
public StrEvaluatorDefinition.StrEvaluator(ValueType type, boolean isNegated)
public void setParameterText(String parameterText)
public StrEvaluatorDefinition.Operations getParameter()
public boolean evaluate(InternalWorkingMemory workingMemory, InternalReadAccessor extractor, InternalFactHandle factHandle, FieldValue value)
Evaluator
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.public boolean evaluate(InternalWorkingMemory workingMemory, InternalReadAccessor leftExtractor, InternalFactHandle left, InternalReadAccessor rightExtractor, InternalFactHandle right)
Evaluator
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.public boolean evaluateCachedLeft(InternalWorkingMemory workingMemory, VariableRestriction.VariableContextEntry context, InternalFactHandle right)
Evaluator
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.public boolean evaluateCachedRight(InternalWorkingMemory workingMemory, VariableRestriction.VariableContextEntry context, InternalFactHandle left)
Evaluator
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.public String toString()
toString
in class BaseEvaluator
Copyright © 2001–2015 JBoss by Red Hat. All rights reserved.