org.drools.rule
Class LiteralRestriction
java.lang.Object
org.drools.rule.LiteralRestriction
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, Restriction
public class LiteralRestriction
- extends java.lang.Object
- implements Restriction
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
LiteralRestriction
public LiteralRestriction(FieldValue field,
Evaluator evaluator,
FieldExtractor fieldExtractor)
getEvaluator
public Evaluator getEvaluator()
getField
public FieldValue getField()
isAllowed
public boolean isAllowed(Extractor extractor,
java.lang.Object object,
InternalWorkingMemory workingMemoiry,
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
getRequiredDeclarations
public Declaration[] getRequiredDeclarations()
- Literal constraints cannot have required declarations, so always return an empty array.
- Specified by:
getRequiredDeclarations
in interface Restriction
- Returns:
- Return an empty
Declaration[]
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
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