edu.indiana.iucbrf.ccbr.conversationblock.selector.flowchart
Class InstructionFlowChartNode

java.lang.Object
  extended by edu.indiana.iucbrf.ccbr.conversationblock.selector.flowchart.FlowChartNode
      extended by edu.indiana.iucbrf.ccbr.conversationblock.selector.flowchart.InstructionFlowChartNode
All Implemented Interfaces:
java.io.Serializable

public class InstructionFlowChartNode
extends FlowChartNode

A FlowChartNode that does not ask a question, it merely provides an instruction.

See Also:
Serialized Form

Field Summary
protected  java.lang.String instructionText
           
protected  FlowChartNode nextNode
           
 
Fields inherited from class edu.indiana.iucbrf.ccbr.conversationblock.selector.flowchart.FlowChartNode
isLeaf
 
Constructor Summary
protected InstructionFlowChartNode()
           
  InstructionFlowChartNode(java.lang.String instructionText, FlowChartNode nextNode)
          Creates a new instance of InstructionFlowChartNode.
 
Method Summary
 void assignChild(int nextNodeIndex, FlowChartNode newNode)
          Give this node a child.
 ConversationBlock getConversationBlockObject(CCBRDomain domain)
          Get the ConversationBlock object corresponding to this node.
 FeatureKey getFeatureQuestioned()
          Get the key of the feature questioned by this node.
protected  FlowChartNode getImmediateNextNode(Feature answer)
           
 java.util.Iterator nextNodesIterator()
           
 java.lang.String toString()
           
 
Methods inherited from class edu.indiana.iucbrf.ccbr.conversationblock.selector.flowchart.FlowChartNode
isLeaf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

instructionText

protected java.lang.String instructionText

nextNode

protected FlowChartNode nextNode
Constructor Detail

InstructionFlowChartNode

protected InstructionFlowChartNode()

InstructionFlowChartNode

public InstructionFlowChartNode(java.lang.String instructionText,
                                FlowChartNode nextNode)
Creates a new instance of InstructionFlowChartNode. This node will provide instructions, but ask no question. If nextNode == null, then no further conversation blocks will be presented (it is the end of the flowchart)

Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

nextNodesIterator

public java.util.Iterator nextNodesIterator()
Specified by:
nextNodesIterator in class FlowChartNode

getFeatureQuestioned

public FeatureKey getFeatureQuestioned()
Description copied from class: FlowChartNode
Get the key of the feature questioned by this node. May be null, for an InstructionFlowChartNode, for example.

Specified by:
getFeatureQuestioned in class FlowChartNode

getImmediateNextNode

protected FlowChartNode getImmediateNextNode(Feature answer)
Specified by:
getImmediateNextNode in class FlowChartNode

getConversationBlockObject

public ConversationBlock getConversationBlockObject(CCBRDomain domain)
Description copied from class: FlowChartNode
Get the ConversationBlock object corresponding to this node.

Specified by:
getConversationBlockObject in class FlowChartNode

assignChild

public void assignChild(int nextNodeIndex,
                        FlowChartNode newNode)
Description copied from class: FlowChartNode
Give this node a child. The nextNodeIndex corresponds to the answer's position in the FSMFeature.

Specified by:
assignChild in class FlowChartNode