org.drools.rule.constraint
Class MvelConstraint.PlainIndexEvaluator

java.lang.Object
  extended by org.drools.rule.constraint.MvelConstraint.PlainIndexEvaluator
All Implemented Interfaces:
Serializable, IndexEvaluator
Enclosing class:
MvelConstraint

public static class MvelConstraint.PlainIndexEvaluator
extends Object
implements IndexEvaluator

See Also:
Serialized Form

Constructor Summary
MvelConstraint.PlainIndexEvaluator()
           
 
Method Summary
 boolean evaluate(InternalWorkingMemory workingMemory, InternalReadAccessor extractor1, Object object1, InternalReadAccessor extractor2, Object object2)
          Evaluates the expression using the provided parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MvelConstraint.PlainIndexEvaluator

public MvelConstraint.PlainIndexEvaluator()
Method Detail

evaluate

public boolean evaluate(InternalWorkingMemory workingMemory,
                        InternalReadAccessor extractor1,
                        Object object1,
                        InternalReadAccessor extractor2,
                        Object object2)
Description copied from interface: IndexEvaluator
Evaluates the expression using the provided parameters. This method is used for internal indexing and hashing, when drools needs to extract and evaluate both left and right values at once. For instance: Person( name == $someName ) This method will be used to extract and evaluate both the "name" attribute and the "$someName" variable at once.

Specified by:
evaluate in interface IndexEvaluator
Parameters:
workingMemory - The current working memory
extractor1 - The extractor to read the left value. In the above example, the "$someName" variable value.
object1 - The source object from where the value of the variable is extracted.
extractor2 - The extractor to read the right value. In the above example, the "name" attribute value.
object2 - 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.


Copyright © 2001-2013 JBoss by Red Hat. All Rights Reserved.