public class EvaluatorConstraint extends MutableTypeConstraint implements IntervalProviderConstraint
Modifier and Type | Class and Description |
---|---|
protected static class |
EvaluatorConstraint.LiteralContextEntry |
Constraint.ConstraintType
Modifier and Type | Field and Description |
---|---|
protected Declaration[] |
declarations |
protected Evaluator |
evaluator |
protected FieldValue |
field |
protected InternalReadAccessor |
rightReadAccessor |
Constructor and Description |
---|
EvaluatorConstraint() |
EvaluatorConstraint(Declaration[] declarations,
Evaluator evaluator,
InternalReadAccessor extractor) |
EvaluatorConstraint(FieldValue field,
Evaluator evaluator,
InternalReadAccessor extractor) |
Modifier and Type | Method and Description |
---|---|
EvaluatorConstraint |
clone()
Clones the constraint
|
ContextEntry |
createContextEntry() |
Evaluator |
getEvaluator() |
FieldValue |
getField() |
Interval |
getInterval() |
Declaration[] |
getRequiredDeclarations()
Returns all the declarations required by the given
constraint implementation.
|
protected InternalReadAccessor |
getRightReadAccessor() |
boolean |
isAllowed(InternalFactHandle handle,
InternalWorkingMemory workingMemory,
ContextEntry context) |
boolean |
isAllowedCachedLeft(ContextEntry context,
InternalFactHandle handle) |
boolean |
isAllowedCachedRight(LeftTuple tuple,
ContextEntry context) |
protected boolean |
isLiteral() |
boolean |
isSelf() |
boolean |
isTemporal()
Returns true in case this constraint is a temporal constraint
|
void |
readExternal(ObjectInput in) |
void |
replaceDeclaration(Declaration oldDecl,
Declaration newDecl)
When a rule contains multiple logical branches, i.e., makes
use of 'OR' CE, it is required to clone patterns and declarations
for each logical branch.
|
void |
writeExternal(ObjectOutput out) |
cloneIfInUse, getType, setInUse, setType
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getType
protected Declaration[] declarations
protected Evaluator evaluator
protected InternalReadAccessor rightReadAccessor
protected FieldValue field
public EvaluatorConstraint()
public EvaluatorConstraint(FieldValue field, Evaluator evaluator, InternalReadAccessor extractor)
public EvaluatorConstraint(Declaration[] declarations, Evaluator evaluator, InternalReadAccessor extractor)
protected boolean isLiteral()
public boolean isAllowed(InternalFactHandle handle, InternalWorkingMemory workingMemory, ContextEntry context)
isAllowed
in interface AlphaNodeFieldConstraint
public boolean isAllowedCachedLeft(ContextEntry context, InternalFactHandle handle)
isAllowedCachedLeft
in interface BetaNodeFieldConstraint
public boolean isAllowedCachedRight(LeftTuple tuple, ContextEntry context)
isAllowedCachedRight
in interface BetaNodeFieldConstraint
public void replaceDeclaration(Declaration oldDecl, Declaration newDecl)
Constraint
replaceDeclaration
in interface Constraint
public Declaration[] getRequiredDeclarations()
Constraint
getRequiredDeclarations
in interface Constraint
public boolean isTemporal()
Constraint
isTemporal
in interface Constraint
public boolean isSelf()
public Interval getInterval()
getInterval
in interface IntervalProviderConstraint
public Evaluator getEvaluator()
public FieldValue getField()
protected InternalReadAccessor getRightReadAccessor()
public EvaluatorConstraint clone()
Constraint
clone
in interface Constraint
clone
in class MutableTypeConstraint
public ContextEntry createContextEntry()
createContextEntry
in interface AlphaNodeFieldConstraint
createContextEntry
in interface BetaNodeFieldConstraint
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
writeExternal
in class MutableTypeConstraint
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
readExternal
in class MutableTypeConstraint
IOException
ClassNotFoundException
Copyright © 2001-2015 JBoss by Red Hat. All Rights Reserved.