public class PredicateConstraint extends MutableTypeConstraint implements Restriction, Wireable, Externalizable
| Modifier and Type | Class and Description |
|---|---|
static class |
PredicateConstraint.PredicateContextEntry |
static class |
PredicateConstraint.SafePredicateExpression |
Wireable.ImmutableConstraint.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, setTypefinalize, getClass, notify, notifyAll, wait, wait, waitgetListenedPropertyMaskpublic 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 ExternalizablereadExternal in class MutableTypeConstraintIOExceptionClassNotFoundExceptionpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizablewriteExternal in class MutableTypeConstraintIOExceptionpublic Declaration[] getRequiredDeclarations()
ConstraintgetRequiredDeclarations in interface ConstraintgetRequiredDeclarations in interface Restrictionpublic void replaceDeclaration(Declaration oldDecl, Declaration newDecl)
RestrictionreplaceDeclaration in interface ConstraintreplaceDeclaration in interface Restrictionpublic void setPredicateExpression(PredicateExpression expression)
public PredicateExpression getPredicateExpression()
public boolean isTemporal()
RestrictionisTemporal in interface ConstraintisTemporal in interface Restrictionpublic ContextEntry createContextEntry()
createContextEntry in interface BetaNodeFieldConstraintcreateContextEntry in interface Restrictionpublic boolean isAllowed(InternalFactHandle handle, InternalWorkingMemory workingMemory)
isAllowed in interface AlphaNodeFieldConstraintpublic boolean isAllowed(InternalReadAccessor extractor, InternalFactHandle handle, InternalWorkingMemory workingMemory, ContextEntry context)
isAllowed in interface Restrictionpublic boolean isAllowedCachedLeft(ContextEntry context, InternalFactHandle handle)
isAllowedCachedLeft in interface BetaNodeFieldConstraintisAllowedCachedLeft in interface Restrictionpublic boolean isAllowedCachedRight(Tuple tuple, ContextEntry context)
isAllowedCachedRight in interface BetaNodeFieldConstraintisAllowedCachedRight in interface Restrictionpublic PredicateConstraint clone()
Constraintclone in interface Constraintclone in interface Restrictionclone in class MutableTypeConstraintpublic Evaluator getEvaluator()
getEvaluator in interface RestrictionCopyright © 2001–2018 JBoss by Red Hat. All rights reserved.