public class SimpleBooleanMessageBuilder extends Object implements MessageTreeBuilder
INDENT_CHAR = ' ' INDENT_NUMBER_OF_SPACES = 4 BOOLEAN_OPERATOR_PREFIX = "\n" BOOLEAN_OPERATOR_SUFFIX = "\n" Example:
MATH101 OR (MATH201 AND (MATH301 OR MATH401))
Constructor and Description |
---|
SimpleBooleanMessageBuilder(BooleanOperators bo)
Creates a success message builder with boolean operators to use in
building the success message.
|
SimpleBooleanMessageBuilder(String andOperator,
String orOperator)
Creates a success message builder with boolean operators to use in
building the success message.
|
Modifier and Type | Method and Description |
---|---|
String |
buildMessage(BooleanNode node)
Builds and sets the success message for a single
boolean
node (b-tree node). |
String |
buildMessage(List<BooleanNode> nodeList)
Builds and sets the success message for each of the boolean nodes
(binary tree) in the
nodeList . |
void |
setBooleanOperatorPrefix(String booleanOperatorPrefix) |
void |
setBooleanOperatorSuffix(String booleanOperatorSuffix) |
void |
setIndentCharacter(int indentChar) |
void |
setIndentNumberOfSpaces(int indentNumberOfSpaces) |
void |
setIndentString(String indentString) |
public SimpleBooleanMessageBuilder(String andOperator, String orOperator)
andOperator
- AND logical operatororOperator
- OR logical operatorpublic SimpleBooleanMessageBuilder(BooleanOperators bo)
bo
- Boolean operators to build success messagepublic void setIndentCharacter(int indentChar)
public void setIndentNumberOfSpaces(int indentNumberOfSpaces)
public void setIndentString(String indentString)
public void setBooleanOperatorPrefix(String booleanOperatorPrefix)
public void setBooleanOperatorSuffix(String booleanOperatorSuffix)
public String buildMessage(List<BooleanNode> nodeList) throws MessageBuilderException
nodeList
.buildMessage
in interface MessageTreeBuilder
nodeList
- List of boolean nodesMessageBuilderException
public String buildMessage(BooleanNode node)
node
(b-tree node).node
- Boolean nodeCopyright © 2004-2013 The Kuali Foundation. All Rights Reserved.