public class BinaryMessageTree extends Object
| Constructor and Description |
|---|
BinaryMessageTree()
Constructor.
|
BinaryMessageTree(String language,
Map<String,? extends BooleanMessage> messageMap)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
public BinaryMessageTree()
public BinaryMessageTree(String language, Map<String,? extends BooleanMessage> messageMap)
messageLanguage - Language for the messagemessageMap - map of boolean messagespublic 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 expressionpublic 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()
Copyright © 2004-2013 The Kuali Foundation. All Rights Reserved.