public class PredicateConstraint extends MutableTypeConstraint implements Restriction, Wireable, Externalizable
Modifier and Type | Class and Description |
---|---|
static class |
PredicateConstraint.PredicateContextEntry |
Wireable.Immutable
Constraint.ConstraintType
Constructor and Description |
---|
PredicateConstraint() |
PredicateConstraint(Declaration[] previousDeclarations,
Declaration[] localDeclarations) |
PredicateConstraint(PredicateExpression evaluator) |
PredicateConstraint(PredicateExpression expression,
Declaration[] previousDeclarations,
Declaration[] localDeclarations) |
Modifier and Type | Method and Description |
---|---|
PredicateConstraint |
clone()
Clones the constraint
|
ContextEntry |
createContextEntry() |
boolean |
equals(Object object) |
Evaluator |
getEvaluator() |
PredicateExpression |
getPredicateExpression() |
Declaration[] |
getRequiredDeclarations()
Returns all the declarations required by the given
constraint implementation.
|
int |
hashCode() |
boolean |
isAllowed(InternalFactHandle handle,
InternalWorkingMemory workingMemory) |
boolean |
isAllowed(InternalReadAccessor extractor,
InternalFactHandle handle,
InternalWorkingMemory workingMemory,
ContextEntry context) |
boolean |
isAllowedCachedLeft(ContextEntry context,
InternalFactHandle handle) |
boolean |
isAllowedCachedRight(Tuple tuple,
ContextEntry context) |
boolean |
isTemporal()
Returns true if this is a temporal restriction
|
void |
readExternal(ObjectInput in) |
void |
replaceDeclaration(Declaration oldDecl,
Declaration newDecl)
A restriction may be required to replace an old
declaration object by a new updated one
|
void |
setPredicateExpression(PredicateExpression expression) |
String |
toString() |
void |
wire(Object object) |
void |
writeExternal(ObjectOutput out) |
cloneIfInUse, getType, setInUse, setType
finalize, getClass, notify, notifyAll, wait, wait, wait
getListenedPropertyMask
public PredicateConstraint()
public PredicateConstraint(PredicateExpression evaluator)
public PredicateConstraint(Declaration[] previousDeclarations, Declaration[] localDeclarations)
public PredicateConstraint(PredicateExpression expression, Declaration[] previousDeclarations, Declaration[] localDeclarations)
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
readExternal
in class MutableTypeConstraint
IOException
ClassNotFoundException
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
writeExternal
in class MutableTypeConstraint
IOException
public Declaration[] getRequiredDeclarations()
Constraint
getRequiredDeclarations
in interface Constraint
getRequiredDeclarations
in interface Restriction
public void replaceDeclaration(Declaration oldDecl, Declaration newDecl)
Restriction
replaceDeclaration
in interface Constraint
replaceDeclaration
in interface Restriction
public void setPredicateExpression(PredicateExpression expression)
public PredicateExpression getPredicateExpression()
public boolean isTemporal()
Restriction
isTemporal
in interface Constraint
isTemporal
in interface Restriction
public ContextEntry createContextEntry()
createContextEntry
in interface BetaNodeFieldConstraint
createContextEntry
in interface Restriction
public boolean isAllowed(InternalFactHandle handle, InternalWorkingMemory workingMemory)
isAllowed
in interface AlphaNodeFieldConstraint
public boolean isAllowed(InternalReadAccessor extractor, InternalFactHandle handle, InternalWorkingMemory workingMemory, ContextEntry context)
isAllowed
in interface Restriction
public boolean isAllowedCachedLeft(ContextEntry context, InternalFactHandle handle)
isAllowedCachedLeft
in interface BetaNodeFieldConstraint
isAllowedCachedLeft
in interface Restriction
public boolean isAllowedCachedRight(Tuple tuple, ContextEntry context)
isAllowedCachedRight
in interface BetaNodeFieldConstraint
isAllowedCachedRight
in interface Restriction
public PredicateConstraint clone()
Constraint
clone
in interface Constraint
clone
in interface Restriction
clone
in class MutableTypeConstraint
public Evaluator getEvaluator()
getEvaluator
in interface Restriction
Copyright © 2001–2020 JBoss by Red Hat. All rights reserved.