Package org.drools.base.rule.constraint
Class NegConstraint
java.lang.Object
org.drools.base.rule.constraint.NegConstraint
- All Implemented Interfaces:
Externalizable,Serializable,Cloneable,AlphaNodeFieldConstraint,Constraint,RuleComponent
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.drools.base.rule.constraint.Constraint
Constraint.ConstraintType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Clones the constraintClone this constraints only if it is already used by a different node, otherwise returns thisbooleanReturns all the declarations required by the given constraint implementation.getType()Returns the type of the constraint, either ALPHA, BETA or UNKNOWNinthashCode()booleanisAllowed(FactHandle handle, ValueResolver valueResolver) booleanReturns true in case this constraint is a temporal constraintvoidvoidreplaceDeclaration(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.booleansetInUse()voidMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.drools.base.rule.constraint.Constraint
addPackageNames, equals, getListenedPropertyMask, getPackageNames, mergeEvaluationContext, registerEvaluationContext
-
Constructor Details
-
NegConstraint
public NegConstraint() -
NegConstraint
public NegConstraint(boolean operator)
-
-
Method Details
-
isAllowed
- Specified by:
isAllowedin interfaceAlphaNodeFieldConstraint
-
cloneIfInUse
Description copied from interface:AlphaNodeFieldConstraintClone this constraints only if it is already used by a different node, otherwise returns this- Specified by:
cloneIfInUsein interfaceAlphaNodeFieldConstraint
-
getRequiredDeclarations
Description copied from interface:ConstraintReturns all the declarations required by the given constraint implementation.- Specified by:
getRequiredDeclarationsin interfaceConstraint- Returns:
-
replaceDeclaration
Description copied from interface:ConstraintWhen 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. Since this is done at ReteOO build type, when constraints were already created, eventually some constraints need to update their references to the declarations.- Specified by:
replaceDeclarationin interfaceConstraint
-
clone
Description copied from interface:ConstraintClones the constraint- Specified by:
clonein interfaceConstraint- Overrides:
clonein classObject- Returns:
-
getType
Description copied from interface:ConstraintReturns the type of the constraint, either ALPHA, BETA or UNKNOWN- Specified by:
getTypein interfaceConstraint- Returns:
-
isTemporal
public boolean isTemporal()Description copied from interface:ConstraintReturns true in case this constraint is a temporal constraint- Specified by:
isTemporalin interfaceConstraint- Returns:
-
setInUse
public boolean setInUse() -
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
equals
-
hashCode
public int hashCode()
-