org.drools.rule
Interface IndexEvaluator

All Superinterfaces:
Serializable
All Known Implementing Classes:
MvelConstraint.PlainIndexEvaluator

public interface IndexEvaluator
extends Serializable


Method Summary
 boolean evaluate(InternalWorkingMemory workingMemory, InternalReadAccessor leftExtractor, Object left, InternalReadAccessor rightExtractor, Object right)
          Evaluates the expression using the provided parameters.
 

Method Detail

evaluate

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

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-2013 JBoss by Red Hat. All Rights Reserved.