Package org.drools.core.common
Class TupleStartEqualsConstraint
java.lang.Object
org.drools.core.common.TupleStartEqualsConstraint
- All Implemented Interfaces:
Externalizable,Serializable,Cloneable,BetaConstraint<ContextEntry>,Constraint,RuleComponent
Checks if one tuple is the start subtuple of other tuple.
For instance, if we have two tuples:
T1 = [ a, b, c ]
T2 = [ a, b, c, d, e]
This constraint will evaluate to true as T1 is the starting subtuple
of T2. On the other hand, if we have:
T1 = [ a, c, b ]
T2 = [ a, b, c, d, e ]
This constraint will evaluate to false, as T1 is not the starting subtuple
of T2. Besides having the same elements, the order is different.
This constraint is used when joining subnetworks back into the main
network.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classNested classes/interfaces inherited from interface org.drools.base.rule.constraint.Constraint
Constraint.ConstraintType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()booleanstatic TupleStartEqualsConstraintgetType()inthashCode()booleanisAllowedCachedLeft(ContextEntry context, FactHandle handle) booleanisAllowedCachedRight(BaseTuple tuple, ContextEntry context) booleanvoidvoidreplaceDeclaration(Declaration oldDecl, Declaration newDecl) toString()voidMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.drools.base.rule.constraint.Constraint
addPackageNames, equals, getListenedPropertyMask, getPackageNames, mergeEvaluationContext, registerEvaluationContext
-
Constructor Details
-
TupleStartEqualsConstraint
public TupleStartEqualsConstraint()
-
-
Method Details
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
getInstance
-
getRequiredDeclarations
- Specified by:
getRequiredDeclarationsin interfaceConstraint
-
replaceDeclaration
- Specified by:
replaceDeclarationin interfaceConstraint
-
isTemporal
public boolean isTemporal()- Specified by:
isTemporalin interfaceConstraint
-
createContext
- Specified by:
createContextin interfaceBetaConstraint<ContextEntry>
-
isAllowedCachedLeft
- Specified by:
isAllowedCachedLeftin interfaceBetaConstraint<ContextEntry>
-
isAllowedCachedRight
- Specified by:
isAllowedCachedRightin interfaceBetaConstraint<ContextEntry>
-
toString
-
hashCode
public int hashCode() -
equals
-
clone
- Specified by:
clonein interfaceConstraint- Overrides:
clonein classObject
-
getType
- Specified by:
getTypein interfaceConstraint
-
cloneIfInUse
- Specified by:
cloneIfInUsein interfaceBetaConstraint<ContextEntry>
-