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

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.PreConditionNode
All Implemented Interfaces:
java.io.Serializable

public class PreConditionNode
extends JumpNode

Precondition node is jump node with precondition 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
PreConditionNode(Node prev, PreCondition 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).
 PreCondition getPreCondition()
          Gets assessment object (precondition) of this node.
 boolean isPreCondition()
          Returns true if this node is precondition 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, isBranchRule, isEnd, isItemRef, isStart
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PreConditionNode

public PreConditionNode(Node prev,
                        PreCondition object)
Constructs node.

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

isPreCondition

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

Precondition node is jump node with precondition object.

Overrides:
isPreCondition in class Node
Returns:
true is this node is precondition node; false otherwise

getPreCondition

public PreCondition getPreCondition()
Gets assessment object (precondition) of this node.

Returns:
assessment object (precondition) 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.