org.drools.rule
Class VariableRestriction

java.lang.Object
  extended by org.drools.rule.VariableRestriction
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Restriction

public class VariableRestriction
extends java.lang.Object
implements Restriction

See Also:
Serialized Form

Nested Class Summary
static class VariableRestriction.BooleanVariableContextEntry
           
static class VariableRestriction.CharVariableContextEntry
           
static class VariableRestriction.DoubleVariableContextEntry
           
static class VariableRestriction.LongVariableContextEntry
           
static class VariableRestriction.ObjectVariableContextEntry
           
static class VariableRestriction.VariableContextEntry
           
 
Constructor Summary
VariableRestriction(FieldExtractor fieldExtractor, Declaration declaration, Evaluator evaluator)
           
 
Method Summary
 java.lang.Object clone()
           
 ContextEntry createContextEntry()
           
 boolean equals(java.lang.Object object)
           
 Evaluator getEvaluator()
           
 Declaration[] getRequiredDeclarations()
           
 int hashCode()
           
 boolean isAllowed(Extractor extractor, java.lang.Object object, InternalWorkingMemory workingMemory, ContextEntry context)
           
 boolean isAllowedCachedLeft(ContextEntry context, java.lang.Object object)
           
 boolean isAllowedCachedRight(ReteTuple tuple, ContextEntry context)
           
 void replaceDeclaration(Declaration oldDecl, Declaration newDecl)
          A restriction may be required to replace an old declaration object by a new updated one
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VariableRestriction

public VariableRestriction(FieldExtractor fieldExtractor,
                           Declaration declaration,
                           Evaluator evaluator)
Method Detail

getRequiredDeclarations

public Declaration[] getRequiredDeclarations()
Specified by:
getRequiredDeclarations in interface Restriction

replaceDeclaration

public void replaceDeclaration(Declaration oldDecl,
                               Declaration newDecl)
Description copied from interface: Restriction
A restriction may be required to replace an old declaration object by a new updated one

Specified by:
replaceDeclaration in interface Restriction

getEvaluator

public Evaluator getEvaluator()

isAllowed

public boolean isAllowed(Extractor extractor,
                         java.lang.Object object,
                         InternalWorkingMemory workingMemory,
                         ContextEntry context)
Specified by:
isAllowed in interface Restriction

isAllowedCachedLeft

public boolean isAllowedCachedLeft(ContextEntry context,
                                   java.lang.Object object)
Specified by:
isAllowedCachedLeft in interface Restriction

isAllowedCachedRight

public boolean isAllowedCachedRight(ReteTuple tuple,
                                    ContextEntry context)
Specified by:
isAllowedCachedRight in interface Restriction

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object object)
Overrides:
equals in class java.lang.Object

createContextEntry

public ContextEntry createContextEntry()
Specified by:
createContextEntry in interface Restriction

clone

public java.lang.Object clone()
Specified by:
clone in interface Restriction
Overrides:
clone in class java.lang.Object