Drools :: Core 6.0.0.Beta5

org.drools.core.rule
Class ConditionalBranch

java.lang.Object
  extended by org.drools.core.rule.ConditionalElement
      extended by org.drools.core.rule.ConditionalBranch
All Implemented Interfaces:
Externalizable, Serializable, Cloneable, NamedConsequenceInvoker, RuleConditionElement, RuleComponent

public class ConditionalBranch
extends ConditionalElement
implements Externalizable, NamedConsequenceInvoker

See Also:
Serialized Form

Constructor Summary
ConditionalBranch()
           
ConditionalBranch(EvalCondition condition, NamedConsequence consequence, ConditionalBranch elseBranch)
           
 
Method Summary
 ConditionalBranch clone()
          There is not reason to clone this object since it is stateless.
 boolean equals(Object obj)
           
 ConditionalBranch getElseBranch()
           
 EvalCondition getEvalCondition()
           
 Map<String,Declaration> getInnerDeclarations()
          It is not possible to declare any new variables, so always return an Empty Map
 NamedConsequence getNamedConsequence()
           
 List<RuleConditionElement> getNestedElements()
          It is not possible to nest elements inside a conditional branch, so always return an empty list.
 Map<String,Declaration> getOuterDeclarations()
          It is not possible to declare and export any variables, so always return an empty map
 int hashCode()
           
 boolean invokesConsequence(String consequenceName)
           
 boolean isPatternScopeDelimiter()
          Returns true in case this RuleConditionElement delimits a pattern visibility scope.
 void readExternal(ObjectInput in)
           
 Declaration resolveDeclaration(String identifier)
          Not possible to resolve any declaration, so always return null.
 String toString()
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConditionalBranch

public ConditionalBranch()

ConditionalBranch

public ConditionalBranch(EvalCondition condition,
                         NamedConsequence consequence,
                         ConditionalBranch elseBranch)
Method Detail

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

clone

public ConditionalBranch clone()
There is not reason to clone this object since it is stateless. So a clone() call will return the instance itself.

Specified by:
clone in interface RuleConditionElement
Specified by:
clone in class ConditionalElement
Returns:
See Also:
org.kie.rule.ConditionalElement#clone()

getInnerDeclarations

public Map<String,Declaration> getInnerDeclarations()
It is not possible to declare any new variables, so always return an Empty Map

Specified by:
getInnerDeclarations in interface RuleConditionElement
Returns:
See Also:
org.kie.rule.RuleConditionElement#getInnerDeclarations()

getNestedElements

public List<RuleConditionElement> getNestedElements()
It is not possible to nest elements inside a conditional branch, so always return an empty list.

Specified by:
getNestedElements in interface RuleConditionElement
Returns:
See Also:
org.kie.rule.RuleConditionElement#getNestedElements()

getOuterDeclarations

public Map<String,Declaration> getOuterDeclarations()
It is not possible to declare and export any variables, so always return an empty map

Specified by:
getOuterDeclarations in interface RuleConditionElement
Returns:
See Also:
org.kie.rule.RuleConditionElement#getOuterDeclarations()

resolveDeclaration

public Declaration resolveDeclaration(String identifier)
Not possible to resolve any declaration, so always return null.

Specified by:
resolveDeclaration in interface RuleConditionElement
Returns:
See Also:
org.kie.rule.RuleConditionElement#resolveDeclaration(java.lang.String)

invokesConsequence

public boolean invokesConsequence(String consequenceName)
Specified by:
invokesConsequence in interface NamedConsequenceInvoker

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object

isPatternScopeDelimiter

public boolean isPatternScopeDelimiter()
Description copied from interface: RuleConditionElement
Returns 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:
isPatternScopeDelimiter in interface RuleConditionElement
Returns:

getEvalCondition

public EvalCondition getEvalCondition()

getNamedConsequence

public NamedConsequence getNamedConsequence()

getElseBranch

public ConditionalBranch getElseBranch()

Drools :: Core 6.0.0.Beta5

Copyright © 2001-2013 JBoss by Red Hat. All Rights Reserved.