Class FinishesEvaluatorDefinition.FinishesEvaluator

  • All Implemented Interfaces:
    java.io.Externalizable, java.io.Serializable, org.drools.base.rule.accessor.Evaluator, MvelEvaluator, org.kie.api.runtime.rule.Evaluator
    Enclosing class:
    FinishesEvaluatorDefinition

    public static class FinishesEvaluatorDefinition.FinishesEvaluator
    extends BaseEvaluator
    Implements the 'finishes' evaluator itself
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      FinishesEvaluator()  
      FinishesEvaluator​(org.drools.base.base.ValueType type, boolean isNegated, long[] parameters, java.lang.String paramText)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      boolean evaluate​(org.drools.base.base.ValueResolver valueResolver, org.drools.base.rule.accessor.ReadAccessor extractor, org.kie.api.runtime.rule.FactHandle object1, org.drools.base.rule.accessor.FieldValue object2)  
      boolean evaluate​(org.drools.base.base.ValueResolver valueResolver, org.drools.base.rule.accessor.ReadAccessor extractor1, org.kie.api.runtime.rule.FactHandle handle1, org.drools.base.rule.accessor.ReadAccessor extractor2, org.kie.api.runtime.rule.FactHandle handle2)  
      boolean evaluateCachedLeft​(org.drools.base.base.ValueResolver valueResolver, VariableRestriction.VariableContextEntry context, org.kie.api.runtime.rule.FactHandle right)
      Evaluates the expression using the provided parameters.
      boolean evaluateCachedRight​(org.drools.base.base.ValueResolver valueResolver, VariableRestriction.VariableContextEntry context, org.kie.api.runtime.rule.FactHandle left)
      Evaluates the expression using the provided parameters.
      org.drools.base.time.Interval getInterval()  
      int hashCode()  
      boolean isTemporal()  
      void readExternal​(java.io.ObjectInput in)  
      java.lang.String toString()  
      void writeExternal​(java.io.ObjectOutput out)  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • FinishesEvaluator

        public FinishesEvaluator()
      • FinishesEvaluator

        public FinishesEvaluator​(org.drools.base.base.ValueType type,
                                 boolean isNegated,
                                 long[] parameters,
                                 java.lang.String paramText)
    • Method Detail

      • readExternal

        public void readExternal​(java.io.ObjectInput in)
                          throws java.io.IOException,
                                 java.lang.ClassNotFoundException
        Specified by:
        readExternal in interface java.io.Externalizable
        Overrides:
        readExternal in class BaseEvaluator
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • writeExternal

        public void writeExternal​(java.io.ObjectOutput out)
                           throws java.io.IOException
        Specified by:
        writeExternal in interface java.io.Externalizable
        Overrides:
        writeExternal in class BaseEvaluator
        Throws:
        java.io.IOException
      • isTemporal

        public boolean isTemporal()
        Specified by:
        isTemporal in interface org.drools.base.rule.accessor.Evaluator
        Specified by:
        isTemporal in interface org.kie.api.runtime.rule.Evaluator
        Overrides:
        isTemporal in class BaseEvaluator
      • getInterval

        public org.drools.base.time.Interval getInterval()
        Specified by:
        getInterval in interface org.drools.base.rule.accessor.Evaluator
        Overrides:
        getInterval in class BaseEvaluator
      • evaluate

        public boolean evaluate​(org.drools.base.base.ValueResolver valueResolver,
                                org.drools.base.rule.accessor.ReadAccessor extractor,
                                org.kie.api.runtime.rule.FactHandle object1,
                                org.drools.base.rule.accessor.FieldValue object2)
      • evaluateCachedRight

        public boolean evaluateCachedRight​(org.drools.base.base.ValueResolver valueResolver,
                                           VariableRestriction.VariableContextEntry context,
                                           org.kie.api.runtime.rule.FactHandle left)
        Description copied from interface: MvelEvaluator
        Evaluates 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 memory
        context - 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,
                                          org.kie.api.runtime.rule.FactHandle right)
        Description copied from interface: MvelEvaluator
        Evaluates 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 memory
        context - 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,
                                org.kie.api.runtime.rule.FactHandle handle1,
                                org.drools.base.rule.accessor.ReadAccessor extractor2,
                                org.kie.api.runtime.rule.FactHandle handle2)
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class BaseEvaluator