org.drools.common
Class InstanceNotEqualsConstraint

java.lang.Object
  extended by org.drools.common.InstanceNotEqualsConstraint
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, BetaNodeFieldConstraint, Constraint, RuleComponent

public class InstanceNotEqualsConstraint
extends java.lang.Object
implements BetaNodeFieldConstraint

See Also:
Serialized Form

Nested Class Summary
static class InstanceNotEqualsConstraint.InstanceNotEqualsConstraintContextEntry
           
 
Nested classes/interfaces inherited from interface org.drools.spi.Constraint
Constraint.ConstraintType
 
Constructor Summary
InstanceNotEqualsConstraint(Pattern otherPattern)
           
 
Method Summary
 java.lang.Object clone()
          Clones the constraint
 ContextEntry createContextEntry()
           
 boolean equals(java.lang.Object object)
           
 Pattern getOtherPattern()
           
 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(ContextEntry entry)
           
 boolean isAllowedCachedLeft(ContextEntry context, java.lang.Object object)
           
 boolean isAllowedCachedRight(ReteTuple tuple, ContextEntry context)
           
 void replaceDeclaration(Declaration oldDecl, Declaration newDecl)
          A constraint may be required to replace an old declaration object by a new updated one
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InstanceNotEqualsConstraint

public InstanceNotEqualsConstraint(Pattern otherPattern)
Method Detail

getRequiredDeclarations

public Declaration[] getRequiredDeclarations()
Description copied from interface: Constraint
Returns all the declarations required by the given constraint implementation.

Specified by:
getRequiredDeclarations in interface Constraint
Returns:

replaceDeclaration

public void replaceDeclaration(Declaration oldDecl,
                               Declaration newDecl)
Description copied from interface: Constraint
A constraint may be required to replace an old declaration object by a new updated one

Specified by:
replaceDeclaration in interface Constraint

getOtherPattern

public Pattern getOtherPattern()

createContextEntry

public ContextEntry createContextEntry()
Specified by:
createContextEntry in interface BetaNodeFieldConstraint

isAllowed

public boolean isAllowed(ContextEntry entry)

isAllowedCachedLeft

public boolean isAllowedCachedLeft(ContextEntry context,
                                   java.lang.Object object)
Specified by:
isAllowedCachedLeft in interface BetaNodeFieldConstraint

isAllowedCachedRight

public boolean isAllowedCachedRight(ReteTuple tuple,
                                    ContextEntry context)
Specified by:
isAllowedCachedRight in interface BetaNodeFieldConstraint

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object object)
Overrides:
equals in class java.lang.Object

clone

public java.lang.Object clone()
Description copied from interface: Constraint
Clones the constraint

Specified by:
clone in interface Constraint
Overrides:
clone in class java.lang.Object
Returns:

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 interface Constraint
Returns: