flattree.tree
Interface Node

All Known Implementing Classes:
AbstractNode, DelimitedNode, DynamicNode, FixedLengthNode, SyntheticNode

public interface Node

A node in a tree.


Method Summary
 List<Leaf> getLeaves()
          Leaves.
 String getName()
          Name of node.
 List<Node> getNodes()
          Children Nodes.
 boolean read(ReadLine line, State state)
          Read this node from the given line, delegating to all leaves.
 void write(WriteLine line, State state)
          Write this node to the given line.
 

Method Detail

getName

String getName()
Name of node.

Returns:
name

getLeaves

List<Leaf> getLeaves()
Leaves.

Returns:
leaves

getNodes

List<Node> getNodes()
Children Nodes.

Returns:
nodes

read

boolean read(ReadLine line,
             State state)
Read this node from the given line, delegating to all leaves.

Parameters:
line - line to read from
state - state to get values for leaves from
Returns:
true if node could be read or false otherwise
Throws:
TreeException - if one of the delegated Leaf.read(ReadLine, State) fails

write

void write(WriteLine line,
           State state)
Write this node to the given line.

Parameters:
line - line to write to
state - state to put values of leaves to


Copyright © 2011. All Rights Reserved.