public class NegConstraint extends Object implements AlphaNodeFieldConstraint
Constraint.ConstraintType| Constructor and Description |
|---|
NegConstraint() |
NegConstraint(boolean operator) |
| Modifier and Type | Method and Description |
|---|---|
NegConstraint |
clone()
Clones the constraint
|
AlphaNodeFieldConstraint |
cloneIfInUse()
Clone this constraints only if it is already used by a different node, otherwise returns this
|
boolean |
equals(Object o) |
Declaration[] |
getRequiredDeclarations()
Returns all the declarations required by the given
constraint implementation.
|
Constraint.ConstraintType |
getType()
Returns the type of the constraint, either ALPHA, BETA or UNKNOWN
|
int |
hashCode() |
boolean |
isAllowed(InternalFactHandle handle,
InternalWorkingMemory workingMemory) |
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.
|
boolean |
setInUse() |
void |
writeExternal(ObjectOutput out) |
finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetListenedPropertyMaskpublic NegConstraint()
public NegConstraint(boolean operator)
public boolean isAllowed(InternalFactHandle handle, InternalWorkingMemory workingMemory)
isAllowed in interface AlphaNodeFieldConstraintpublic AlphaNodeFieldConstraint cloneIfInUse()
AlphaNodeFieldConstraintcloneIfInUse in interface AlphaNodeFieldConstraintpublic Declaration[] getRequiredDeclarations()
ConstraintgetRequiredDeclarations in interface Constraintpublic void replaceDeclaration(Declaration oldDecl, Declaration newDecl)
ConstraintreplaceDeclaration in interface Constraintpublic NegConstraint clone()
Constraintclone in interface Constraintclone in class Objectpublic Constraint.ConstraintType getType()
ConstraintgetType in interface Constraintpublic boolean isTemporal()
ConstraintisTemporal in interface Constraintpublic boolean setInUse()
public void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionCopyright © 2001–2020 JBoss by Red Hat. All rights reserved.