tools.blend
Class AndNode

java.lang.Object
  extended by tools.blend.Node
      extended by tools.blend.AndNode

public class AndNode
extends Node

An AND node tries all children one by one. If any fail then the path is short-circuited to the parent's fail. If all pass then the flow continues with the parent's pass.


Constructor Summary
AndNode(Node parent, CapNode cap)
          This constructs a new AND node
 
Method Summary
 java.lang.String whereDoIGoOnFail(Node whichChildAmI)
           
 java.lang.String whereDoIGoOnPass(Node whichChildAmI)
          When a child node finishes its processing it can either have passed or failed and needs a destination to jump to (another compare-node or the pass/fail blocks).
 
Methods inherited from class tools.blend.Node
addChild, getChildIndex, getName, getStartingCompareNode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AndNode

public AndNode(Node parent,
               CapNode cap)
This constructs a new AND node

Parameters:
parent - the parent node
cap - the root of the expression
Method Detail

whereDoIGoOnPass

public java.lang.String whereDoIGoOnPass(Node whichChildAmI)
Description copied from class: Node
When a child node finishes its processing it can either have passed or failed and needs a destination to jump to (another compare-node or the pass/fail blocks). This method returns the next place.

Specified by:
whereDoIGoOnPass in class Node
Parameters:
whichChildAmI - which child I am (AND and OR have multiple children)
Returns:
the name of the next jump destination

whereDoIGoOnFail

public java.lang.String whereDoIGoOnFail(Node whichChildAmI)
Specified by:
whereDoIGoOnFail in class Node