Package org.drools.base.rule
Class ConditionalBranch
java.lang.Object
org.drools.base.rule.ConditionalElement
org.drools.base.rule.ConditionalBranch
- All Implemented Interfaces:
Externalizable,Serializable,Cloneable,NamedConsequenceInvoker,RuleComponent,RuleConditionElement
public class ConditionalBranch
extends ConditionalElement
implements Externalizable, NamedConsequenceInvoker
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConditionalBranch(EvalCondition condition, NamedConsequence consequence, ConditionalBranch elseBranch) -
Method Summary
Modifier and TypeMethodDescriptionclone()There is not reason to clone this object since it is stateless.booleanIt is not possible to declare any new variables, so always return an Empty MapIt is not possible to nest elements inside a conditional branch, so always return an empty list.It is not possible to declare and export any variables, so always return an empty mapinthashCode()booleaninvokesConsequence(String consequenceName) booleanReturns true in case this RuleConditionElement delimits a pattern visibility scope.voidresolveDeclaration(String identifier) Not possible to resolve any declaration, so always return null.toString()void
-
Constructor Details
-
ConditionalBranch
public ConditionalBranch() -
ConditionalBranch
public ConditionalBranch(EvalCondition condition, NamedConsequence consequence, ConditionalBranch elseBranch)
-
-
Method Details
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
clone
There is not reason to clone this object since it is stateless. So a clone() call will return the instance itself.- Specified by:
clonein interfaceRuleConditionElement- Specified by:
clonein classConditionalElement- Returns:
-
getInnerDeclarations
It is not possible to declare any new variables, so always return an Empty Map- Specified by:
getInnerDeclarationsin interfaceRuleConditionElement- Returns:
-
getNestedElements
It is not possible to nest elements inside a conditional branch, so always return an empty list.- Specified by:
getNestedElementsin interfaceRuleConditionElement- Returns:
-
getOuterDeclarations
It is not possible to declare and export any variables, so always return an empty map- Specified by:
getOuterDeclarationsin interfaceRuleConditionElement- Returns:
-
resolveDeclaration
Not possible to resolve any declaration, so always return null.- Specified by:
resolveDeclarationin interfaceRuleConditionElement- Returns:
-
invokesConsequence
- Specified by:
invokesConsequencein interfaceNamedConsequenceInvoker
-
hashCode
public int hashCode() -
equals
-
toString
-
isPatternScopeDelimiter
public boolean isPatternScopeDelimiter()Description copied from interface:RuleConditionElementReturns true in case this RuleConditionElement delimits a pattern visibility scope. For instance, AND CE is not a scope delimiter, while NOT CE is a scope delimiter- Specified by:
isPatternScopeDelimiterin interfaceRuleConditionElement- Returns:
-
getEvalCondition
-
getNamedConsequence
-
getElseBranch
-