org.drools.rule
Class VariableConstraint.WrapperIndexEvaluator

java.lang.Object
  extended by org.drools.rule.VariableConstraint.WrapperIndexEvaluator
All Implemented Interfaces:
Serializable, IndexEvaluator
Enclosing class:
VariableConstraint

public static class VariableConstraint.WrapperIndexEvaluator
extends Object
implements IndexEvaluator

See Also:
Serialized Form

Method Summary
 boolean evaluate(InternalWorkingMemory workingMemory, InternalReadAccessor leftExtractor, Object left, InternalReadAccessor rightExtractor, Object right)
          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
 

Method Detail

evaluate

public boolean evaluate(InternalWorkingMemory workingMemory,
                        InternalReadAccessor leftExtractor,
                        Object left,
                        InternalReadAccessor rightExtractor,
                        Object right)
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
leftExtractor - 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.
Returns:
Returns true if evaluation is successful. false otherwise.


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