Package org.drools.mvel.evaluators
Class StartedByEvaluatorDefinition.StartedByEvaluator
java.lang.Object
org.drools.mvel.evaluators.BaseEvaluator
org.drools.mvel.evaluators.StartedByEvaluatorDefinition.StartedByEvaluator
- All Implemented Interfaces:
Externalizable,Serializable,org.drools.base.rule.accessor.Evaluator,MvelEvaluator,Evaluator
- Enclosing class:
- StartedByEvaluatorDefinition
Implements the 'startedby' evaluator itself
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionStartedByEvaluator(org.drools.base.base.ValueType type, boolean isNegated, long[] params, String paramText) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanevaluate(org.drools.base.base.ValueResolver valueResolver, org.drools.base.rule.accessor.ReadAccessor extractor, FactHandle object1, org.drools.base.rule.accessor.FieldValue object2) booleanevaluate(org.drools.base.base.ValueResolver valueResolver, org.drools.base.rule.accessor.ReadAccessor extractor1, FactHandle handle1, org.drools.base.rule.accessor.ReadAccessor extractor2, FactHandle handle2) booleanevaluateCachedLeft(org.drools.base.base.ValueResolver valueResolver, VariableRestriction.VariableContextEntry context, FactHandle right) Evaluates the expression using the provided parameters.booleanevaluateCachedRight(org.drools.base.base.ValueResolver valueResolver, VariableRestriction.VariableContextEntry context, FactHandle left) Evaluates the expression using the provided parameters.org.drools.base.time.IntervalinthashCode()booleanvoidtoString()voidMethods inherited from class org.drools.mvel.evaluators.BaseEvaluator
getCoercedValueType, getOperator, getValueType
-
Constructor Details
-
StartedByEvaluator
public StartedByEvaluator() -
StartedByEvaluator
public StartedByEvaluator(org.drools.base.base.ValueType type, boolean isNegated, long[] params, String paramText)
-
-
Method Details
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Overrides:
readExternalin classBaseEvaluator- Throws:
IOExceptionClassNotFoundException
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Overrides:
writeExternalin classBaseEvaluator- Throws:
IOException
-
isTemporal
public boolean isTemporal()- Specified by:
isTemporalin interfaceorg.drools.base.rule.accessor.Evaluator- Specified by:
isTemporalin interfaceEvaluator- Overrides:
isTemporalin classBaseEvaluator
-
getInterval
public org.drools.base.time.Interval getInterval()- Specified by:
getIntervalin interfaceorg.drools.base.rule.accessor.Evaluator- Overrides:
getIntervalin classBaseEvaluator
-
evaluate
public boolean evaluate(org.drools.base.base.ValueResolver valueResolver, org.drools.base.rule.accessor.ReadAccessor extractor, FactHandle object1, org.drools.base.rule.accessor.FieldValue object2) -
evaluateCachedRight
public boolean evaluateCachedRight(org.drools.base.base.ValueResolver valueResolver, VariableRestriction.VariableContextEntry context, FactHandle left) Description copied from interface:MvelEvaluatorEvaluates the expression using the provided parameters. This method is used when evaluating right-activated beta-constraints, i.e., a fact attribute against a variable value, that is activated from the right. For instance: Person( name == $someName ) This method will be used when a new Person instance is evaluated. So it will cache the value of the "Person" instance and will iterate over the left memory comparing it to each "$someName" bound values.- Parameters:
valueResolver- 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.- Returns:
- Returns true if evaluation is successful. false otherwise.
-
evaluateCachedLeft
public boolean evaluateCachedLeft(org.drools.base.base.ValueResolver valueResolver, VariableRestriction.VariableContextEntry context, FactHandle right) Description copied from interface:MvelEvaluatorEvaluates the expression using the provided parameters. This method is used when evaluating left-activated beta-constraints, i.e., a fact attribute against a variable value, that is activated from the left. For instance: Person( name == $someName ) This method will be used when a new $someName variable is bound. So it will cache the value of $someName and will iterate over the right memory (Person instances) evaluating each occurrence.- Parameters:
valueResolver- 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.- Returns:
- Returns true if evaluation is successful. false otherwise.
-
evaluate
public boolean evaluate(org.drools.base.base.ValueResolver valueResolver, org.drools.base.rule.accessor.ReadAccessor extractor1, FactHandle handle1, org.drools.base.rule.accessor.ReadAccessor extractor2, FactHandle handle2) -
toString
- Overrides:
toStringin classBaseEvaluator
-
hashCode
public int hashCode()- Overrides:
hashCodein classBaseEvaluator
-
equals
- Overrides:
equalsin classBaseEvaluator
-