org.kuali.student.common.messagebuilder.impl
Class SuccessMessageBuilder

java.lang.Object
  extended by org.kuali.student.common.messagebuilder.impl.SuccessMessageBuilder

public class SuccessMessageBuilder
extends Object

This class creates success messages for boolean binary tree nodes.


Field Summary
private  BooleanOperators booleanOperators
          Boolean operators to use in creating the success message
 
Constructor Summary
SuccessMessageBuilder(BooleanOperators bo)
          Creates a success message builder with boolean operators to use in building the success message.
 
Method Summary
private  void buildAndNodeSuccessMessage(BooleanNode node)
          Builds a success message for an AND node (b-tree node) where left node and right node are true.
private  void buildOr1NodeSuccessMessage(BooleanNode node)
          Builds a success message for an OR node (b-tree node) where left node is true and right node is false or left node is false and right node is true.
private  void buildOr2NodeSuccessMessage(BooleanNode node)
          Builds a success message for an OR node (b-tree node) where left node and right node are true.
 String buildSuccessMessage(BooleanNode node)
          Builds and sets the success message for a single boolean node (b-tree node).
 String buildSuccessMessage(List<BooleanNode> nodeList)
          Builds and sets the success message for each of the boolean nodes (binary tree) in the nodeList.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

booleanOperators

private BooleanOperators booleanOperators
Boolean operators to use in creating the success message

Constructor Detail

SuccessMessageBuilder

public SuccessMessageBuilder(BooleanOperators bo)
Creates a success message builder with boolean operators to use in building the success message.

Parameters:
bo - Boolean operators to build success message
Method Detail

buildSuccessMessage

public String buildSuccessMessage(List<BooleanNode> nodeList)
                           throws MessageBuilderException
Builds and sets the success message for each of the boolean nodes (binary tree) in the nodeList.

Parameters:
nodeList - List of boolean nodes
Returns:
Complete success message
Throws:
MessageBuilderException

buildSuccessMessage

public String buildSuccessMessage(BooleanNode node)
Builds and sets the success message for a single boolean node (b-tree node).

Parameters:
node - Boolean node

buildAndNodeSuccessMessage

private void buildAndNodeSuccessMessage(BooleanNode node)
Builds a success message for an AND node (b-tree node) where left node and right node are true.

Parameters:
node - Boolean node

buildOr1NodeSuccessMessage

private void buildOr1NodeSuccessMessage(BooleanNode node)
Builds a success message for an OR node (b-tree node) where left node is true and right node is false or left node is false and right node is true.

Parameters:
node - Boolean node

buildOr2NodeSuccessMessage

private void buildOr2NodeSuccessMessage(BooleanNode node)
Builds a success message for an OR node (b-tree node) where left node and right node are true.

Parameters:
node -


Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.