de.qfs.lib.tree
Interface NodeFactory
- public interface NodeFactory
This interface must be implement in order to create a tree with a TreeBuilder
.
- Since:
- 0.98.1
- Version:
- $Revision: 1.1 $
- Author:
- Gregor Schmid
Method Summary |
java.lang.Object |
createNode(java.lang.Object data)
Create a new tree node. |
void |
finishNode(java.lang.Object node)
Finish a tree node. |
createNode
public java.lang.Object createNode(java.lang.Object data)
- Create a new tree node. Called when a node is encountered for the first
time.
- Parameters:
data
- Some information about the node.- Returns:
- The new node. It is ok to return null if no node should be
created for the data.
finishNode
public void finishNode(java.lang.Object node)
- Finish a tree node. Called when all of the node's children have been
built and finished.
- Parameters:
node
- The node to finish.