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, wait
getListenedPropertyMask
public NegConstraint()
public NegConstraint(boolean operator)
public boolean isAllowed(InternalFactHandle handle, InternalWorkingMemory workingMemory)
isAllowed
in interface AlphaNodeFieldConstraint
public AlphaNodeFieldConstraint cloneIfInUse()
AlphaNodeFieldConstraint
cloneIfInUse
in interface AlphaNodeFieldConstraint
public Declaration[] getRequiredDeclarations()
Constraint
getRequiredDeclarations
in interface Constraint
public void replaceDeclaration(Declaration oldDecl, Declaration newDecl)
Constraint
replaceDeclaration
in interface Constraint
public NegConstraint clone()
Constraint
clone
in interface Constraint
clone
in class Object
public Constraint.ConstraintType getType()
Constraint
getType
in interface Constraint
public boolean isTemporal()
Constraint
isTemporal
in interface Constraint
public boolean setInUse()
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
Copyright © 2001–2019 JBoss by Red Hat. All rights reserved.