|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.student.common.messagebuilder.booleanmessage.ast.BinaryMessageTree
public class BinaryMessageTree
Constructor Summary | |
---|---|
BinaryMessageTree()
Constructor. |
|
BinaryMessageTree(String language,
Map<String,? extends BooleanMessage> messageMap)
Constructor. |
Method Summary | |
---|---|
BooleanNode |
buildTree(String booleanFunction)
Builds the binary message tree from the booleanFunction . |
List<BooleanNode> |
getAllNodes()
Gets all boolean nodes. |
BooleanNode |
getRoot()
Gets the root boolean node. |
void |
traverseTreePostOrder(BooleanNode bnode,
BooleanNode parent)
This method walks the tree depth first, while setting node values with setNode(). |
void |
traverseTreePostOrderDontSetNode(BooleanNode bnode,
BooleanNode parent)
This method walks the tree depth first. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BinaryMessageTree()
public BinaryMessageTree(String language, Map<String,? extends BooleanMessage> messageMap)
messageLanguage
- Language for the messagemessageMap
- map of boolean messagesMethod Detail |
---|
public BooleanNode buildTree(String booleanFunction)
Builds the binary message tree from the booleanFunction
.
Order of boolean operation: ANDs before ORs and operations inside parentheses before anything else.
Example: A AND B OR C AND D evaluates to (A AND B) OR (C AND D).
booleanFunction:
- Boolean expression
public void traverseTreePostOrder(BooleanNode bnode, BooleanNode parent)
bnode
- Boolean nodeparent
- Parent boolean nodepublic void traverseTreePostOrderDontSetNode(BooleanNode bnode, BooleanNode parent)
bnode
- Boolean nodeparent
- Parent boolean nodepublic List<BooleanNode> getAllNodes()
public BooleanNode getRoot()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |