org.drools.rule
Class AndConstraint

java.lang.Object
  extended by org.drools.rule.MutableTypeConstraint
      extended by org.drools.rule.AbstractCompositeConstraint
          extended by org.drools.rule.AndConstraint
All Implemented Interfaces:
Externalizable, Serializable, Cloneable, AlphaNodeFieldConstraint, BetaNodeFieldConstraint, Constraint, RuleComponent

public class AndConstraint
extends AbstractCompositeConstraint

AND composite constraint, so the user can do things like: Person( name == 'Edson' && surname == 'Tirelli' )

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.drools.rule.AbstractCompositeConstraint
AbstractCompositeConstraint.MultiFieldConstraintContextEntry
 
Nested classes/interfaces inherited from interface org.drools.spi.Constraint
Constraint.ConstraintType
 
Field Summary
 
Fields inherited from class org.drools.rule.AbstractCompositeConstraint
alphaConstraints, betaConstraints, requiredDeclarations
 
Constructor Summary
AndConstraint()
           
 
Method Summary
 Object clone()
          Clones the constraint
 boolean equals(Object object)
           
 int hashCode()
           
 boolean isAllowed(InternalFactHandle handle, InternalWorkingMemory workingMemory, ContextEntry ctx)
          
 boolean isAllowedCachedLeft(ContextEntry context, InternalFactHandle handle)
          
 boolean isAllowedCachedRight(LeftTuple tuple, ContextEntry context)
          
 
Methods inherited from class org.drools.rule.AbstractCompositeConstraint
addAlphaConstraint, addBetaConstraint, addConstraint, createContextEntry, getAlphaConstraints, getBetaConstraints, getRequiredDeclarations, isTemporal, readExternal, replaceDeclaration, updateRequiredDeclarations, writeExternal
 
Methods inherited from class org.drools.rule.MutableTypeConstraint
getType, setType
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AndConstraint

public AndConstraint()
Method Detail

isAllowed

public boolean isAllowed(InternalFactHandle handle,
                         InternalWorkingMemory workingMemory,
                         ContextEntry ctx)


isAllowedCachedLeft

public boolean isAllowedCachedLeft(ContextEntry context,
                                   InternalFactHandle handle)


isAllowedCachedRight

public boolean isAllowedCachedRight(LeftTuple tuple,
                                    ContextEntry context)


hashCode

public int hashCode()
Overrides:
hashCode in class AbstractCompositeConstraint

equals

public boolean equals(Object object)
Overrides:
equals in class AbstractCompositeConstraint

clone

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

Specified by:
clone in interface Constraint
Specified by:
clone in class AbstractCompositeConstraint
Returns:


Copyright © 2001-2013 JBoss Inc.. All Rights Reserved.