|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.student.common.messagebuilder.impl.SimpleBooleanMessageBuilder
public class SimpleBooleanMessageBuilder
This class creates success messages for boolean binary tree nodes. Default display is a single line message (e.g. A OR (B AND (C OR D))). To display as multiple lines where each operator and message is on its own line. set the following:
INDENT_CHAR = ' ' INDENT_NUMBER_OF_SPACES = 4 BOOLEAN_OPERATOR_PREFIX = "\n" BOOLEAN_OPERATOR_SUFFIX = "\n" Example:
MATH101 OR (MATH201 AND (MATH301 OR MATH401))
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleBooleanMessageBuilder(String andOperator, String orOperator)
andOperator
- AND logical operatororOperator
- OR logical operatorpublic SimpleBooleanMessageBuilder(BooleanOperators bo)
bo
- Boolean operators to build success messageMethod Detail |
---|
public 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 nodes
MessageBuilderException
public String buildMessage(BooleanNode node)
node
(b-tree node).
node
- Boolean node
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |