org.qtitools.qti.node.test.flow
Class BranchRuleNode

java.lang.Object
  extended by org.qtitools.qti.node.test.flow.Node
      extended by org.qtitools.qti.node.test.flow.MiddleNode
          extended by org.qtitools.qti.node.test.flow.JumpNode
              extended by org.qtitools.qti.node.test.flow.BranchRuleNode
All Implemented Interfaces:
java.io.Serializable

public class BranchRuleNode
extends JumpNode

Branch rule node is jump node with branch rule assessment object.

Author:
Jiri Kajaba
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.qtitools.qti.node.test.flow.Node
logger
 
Constructor Summary
BranchRuleNode(Node prev, BranchRule object)
          Constructs node.
 
Method Summary
protected  Node evaluate(boolean condition)
          Evaluates target of this jump node (which node will be next in item flow after this jump).
 BranchRule getBranchRule()
          Gets assessment object (branch rule) of this node.
 boolean isBranchRule()
          Returns true if this node is branch rule node; false otherwise.
 
Methods inherited from class org.qtitools.qti.node.test.flow.JumpNode
evaluate, getJump, getTarget, isJump, setTarget, toString
 
Methods inherited from class org.qtitools.qti.node.test.flow.MiddleNode
isMiddle
 
Methods inherited from class org.qtitools.qti.node.test.flow.Node
getIndex, getNext, getObject, getPrev, isBorder, isEnd, isItemRef, isPreCondition, isStart
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BranchRuleNode

public BranchRuleNode(Node prev,
                      BranchRule object)
Constructs node.

Parameters:
prev - previous node in linked list
object - assessment object (branch rule)
Method Detail

isBranchRule

public boolean isBranchRule()
Description copied from class: Node
Returns true if this node is branch rule node; false otherwise.

Branch rule node is jump node with branch rule object.

Overrides:
isBranchRule in class Node
Returns:
true is this node is branch rule node; false otherwise

getBranchRule

public BranchRule getBranchRule()
Gets assessment object (branch rule) of this node.

Returns:
assessment object (branch rule) of this node

evaluate

protected Node evaluate(boolean condition)
Description copied from class: JumpNode
Evaluates target of this jump node (which node will be next in item flow after this jump).

Specified by:
evaluate in class JumpNode
Parameters:
condition - result of evaluation of jump's expression
Returns:
next node in item flow after this jump


Copyright © 2009. All Rights Reserved.