|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectflattree.TreeReader
public class TreeReader
A reader of a tree's Nodes.
read()| Field Summary | |
|---|---|
static int |
END
|
static int |
START
|
| Constructor Summary | |
|---|---|
TreeReader(Node root,
FlatReader reader)
Read nodes from the given reader. |
|
| Method Summary | |
|---|---|
Node |
getCurrentNode()
Get the currently read node. |
String |
getName()
Get the name of the recently started Node. |
Position |
getPosition()
|
Range |
getRange()
Get the range for current Node. |
Range |
getRange(Leaf leaf)
Get a leaf's range for the current Node. |
Map<String,String> |
getValues()
Get the leaves' values for the recently started Node. |
protected State |
newState()
Factory method to create a new state. |
int |
read()
Read the next START or END. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int START
public static final int END
| Constructor Detail |
|---|
public TreeReader(Node root,
FlatReader reader)
root - root nodereader - reader to read from| Method Detail |
|---|
public Node getCurrentNode()
IllegalStateException - if no node is currently readpublic int read()
START or END.
START or END
TreeException - if no Node was able to read the current line
TreeException - if Node.read(ReadLine, State) failed to read the
current linegetName(),
getValues()public Position getPosition()
public String getName()
Node.
STARTpublic Map<String,String> getValues()
Node.
read(),
STARTpublic Range getRange()
TreeProcessorNode.
getRange in interface TreeProcessorpublic Range getRange(Leaf leaf)
TreeProcessorNode.
getRange in interface TreeProcessorleaf - leaf to get range for
protected State newState()
Node
.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||