Package org.drools.core.rule
Class MutableTypeConstraint
- java.lang.Object
-
- org.drools.core.rule.MutableTypeConstraint
-
- All Implemented Interfaces:
Externalizable
,Serializable
,Cloneable
,AlphaNodeFieldConstraint
,BetaNodeFieldConstraint
,Constraint
,RuleComponent
- Direct Known Subclasses:
AbstractCompositeConstraint
,EvaluatorConstraint
,PredicateConstraint
,XpathConstraint
public abstract class MutableTypeConstraint extends Object implements AlphaNodeFieldConstraint, BetaNodeFieldConstraint, Externalizable
A base class for constraints- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.drools.core.spi.Constraint
Constraint.ConstraintType
-
-
Constructor Summary
Constructors Constructor Description MutableTypeConstraint()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract MutableTypeConstraint
clone()
Clones the constraintMutableTypeConstraint
cloneIfInUse()
Clone this constraints only if it is already used by a different node, otherwise returns thisConstraint.ConstraintType
getType()
Returns the type of the constraint, either ALPHA, BETA or UNKNOWNvoid
readExternal(ObjectInput in)
boolean
setInUse()
void
setType(Constraint.ConstraintType type)
void
writeExternal(ObjectOutput out)
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.drools.core.spi.AlphaNodeFieldConstraint
isAllowed
-
Methods inherited from interface org.drools.core.spi.BetaNodeFieldConstraint
createContextEntry, isAllowedCachedLeft, isAllowedCachedRight
-
Methods inherited from interface org.drools.core.spi.Constraint
addPackageNames, equals, getListenedPropertyMask, getListenedPropertyMask, getPackageNames, getRequiredDeclarations, isTemporal, mergeEvaluationContext, registerEvaluationContext, replaceDeclaration
-
-
-
-
Method Detail
-
setType
public void setType(Constraint.ConstraintType type)
-
getType
public Constraint.ConstraintType getType()
Description copied from interface:Constraint
Returns the type of the constraint, either ALPHA, BETA or UNKNOWN- Specified by:
getType
in interfaceConstraint
- Returns:
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
clone
public abstract MutableTypeConstraint clone()
Description copied from interface:Constraint
Clones the constraint- Specified by:
clone
in interfaceConstraint
- Overrides:
clone
in classObject
- Returns:
-
cloneIfInUse
public MutableTypeConstraint cloneIfInUse()
Description copied from interface:AlphaNodeFieldConstraint
Clone this constraints only if it is already used by a different node, otherwise returns this- Specified by:
cloneIfInUse
in interfaceAlphaNodeFieldConstraint
- Specified by:
cloneIfInUse
in interfaceBetaNodeFieldConstraint
-
setInUse
public boolean setInUse()
-
-