org.drools.rule
Class OrConstraint
java.lang.Object
org.drools.rule.MutableTypeConstraint
org.drools.rule.AbstractCompositeConstraint
org.drools.rule.OrConstraint
- All Implemented Interfaces:
- Externalizable, Serializable, Cloneable, AlphaNodeFieldConstraint, BetaNodeFieldConstraint, Constraint, RuleComponent
public class OrConstraint
- extends AbstractCompositeConstraint
A class to implement Multi-Field OR constraints, so user can do:
Person( hair == 'blue' || eyes == 'blue' )
- See Also:
- Serialized Form
Methods inherited from class org.drools.rule.AbstractCompositeConstraint |
addAlphaConstraint, addBetaConstraint, addConstraint, createContextEntry, getAlphaConstraints, getBetaConstraints, getRequiredDeclarations, isTemporal, readExternal, replaceDeclaration, updateRequiredDeclarations, writeExternal |
OrConstraint
public OrConstraint()
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.