org.drools.spi
Interface Constraint

All Superinterfaces:
java.lang.Cloneable, RuleComponent, java.io.Serializable
All Known Subinterfaces:
AlphaNodeFieldConstraint, BetaNodeFieldConstraint
All Known Implementing Classes:
AbstractCompositeConstraint, AndConstraint, InstanceEqualsConstraint, InstanceNotEqualsConstraint, LiteralConstraint, MultiRestrictionFieldConstraint, MutableTypeConstraint, OrConstraint, PredicateConstraint, ReturnValueConstraint, TupleStartEqualsConstraint, VariableConstraint

public interface Constraint
extends RuleComponent, java.lang.Cloneable


Nested Class Summary
static class Constraint.ConstraintType
          A java 1.4 type-safe enum
 
Method Summary
 java.lang.Object clone()
          Clones the constraint
 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
 void replaceDeclaration(Declaration oldDecl, Declaration newDecl)
          A constraint may be required to replace an old declaration object by a new updated one
 

Method Detail

getRequiredDeclarations

Declaration[] getRequiredDeclarations()
Returns all the declarations required by the given constraint implementation.

Returns:

replaceDeclaration

void replaceDeclaration(Declaration oldDecl,
                        Declaration newDecl)
A constraint may be required to replace an old declaration object by a new updated one

Parameters:
oldDecl -
newDecl -

clone

java.lang.Object clone()
Clones the constraint

Returns:

getType

Constraint.ConstraintType getType()
Returns the type of the constraint, either ALPHA, BETA or UNKNOWN

Returns: