|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectflattree.TreeWriter
public class TreeWriter
A writer of a tree's Nodes.
writeStart(String, Map),
writeEnd()| Constructor Summary | |
|---|---|
TreeWriter(FlatWriter writer)
Write nodes to the given writer. |
|
TreeWriter(Node root,
FlatWriter writer)
Write nodes to the given writer. |
|
| Method Summary | |
|---|---|
protected Node |
createNode(Node parent,
String name,
Map<String,String> values)
Hook method for subclasses to create a child node with the given name. |
Position |
getPosition()
|
Range |
getRange()
Get the range for current Node. |
Range |
getRange(Leaf leaf)
Get a leaf's range for the current Node. |
protected State |
newState(Map<String,String> values)
|
void |
writeEnd()
End the current Node. |
void |
writeStart(String name,
Map<String,String> values)
Start a Node. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TreeWriter(FlatWriter writer)
writer - write to write tocreateNode(Node, String, Map)
public TreeWriter(Node root,
FlatWriter writer)
root - root nodewriter - write to write to| Method Detail |
|---|
public void writeStart(String name,
Map<String,String> values)
Node.
name - name of node to startvalues - values for the node's leavespublic Position getPosition()
protected Node createNode(Node parent,
String name,
Map<String,String> values)
TreeException.
parent - parent of node to create, null if rootname - name of node to createvalues - values leaves' values
null
TreeException - alwayspublic Range getRange()
TreeProcessorNode.
getRange in interface TreeProcessorpublic Range getRange(Leaf leaf)
TreeProcessorNode.
getRange in interface TreeProcessorleaf - leaf to get range for
public void writeEnd()
Node.
protected State newState(Map<String,String> values)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||