story.scheherazade.verbalizer
Class VerbalizeBranchOnState

java.lang.Object
  extended by story.scheherazade.verbalizer.VerbalizeBranchOnState
All Implemented Interfaces:
DiscourseCommand, DiscourseExecutable

public class VerbalizeBranchOnState
extends java.lang.Object
implements DiscourseCommand

A verbalizer plan that branches on whether a certain boolean value in the VerbalizerState is true or false.


Constructor Summary
VerbalizeBranchOnState(java.lang.String key, DiscoursePlan ifTrue, DiscoursePlan ifFalse)
           
 
Method Summary
 Verbalization execute(StoryInterpreter story, Style style, VerbalizerState state)
           
 DiscoursePlan getIfFalse()
           
 DiscoursePlan getIfTrue()
           
 void intern()
           
 java.lang.StringBuffer render()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VerbalizeBranchOnState

public VerbalizeBranchOnState(java.lang.String key,
                              DiscoursePlan ifTrue,
                              DiscoursePlan ifFalse)
                       throws Scheherexception
Throws:
Scheherexception
Method Detail

render

public java.lang.StringBuffer render()
                              throws Scheherexception
Specified by:
render in interface DiscourseCommand
Specified by:
render in interface DiscourseExecutable
Throws:
Scheherexception

getIfTrue

public DiscoursePlan getIfTrue()

getIfFalse

public DiscoursePlan getIfFalse()

execute

public Verbalization execute(StoryInterpreter story,
                             Style style,
                             VerbalizerState state)
                      throws Scheherexception
Specified by:
execute in interface DiscourseCommand
Throws:
Scheherexception

intern

public void intern()
Specified by:
intern in interface DiscourseCommand
Specified by:
intern in interface DiscourseExecutable


Copyright © 2011 David K. Elson. All Rights Reserved.