fmrisc.Communication
Class BreakInfo

java.lang.Object
  extended by fmrisc.Communication.BreakInfo

public final class BreakInfo
extends java.lang.Object

Line break information for pretty-printing abstract syntax trees.


Method Summary
static BreakInfo compute(AST tree, boolean mathml)
          Construct the line break information for the denoted tree.
 java.util.Vector getChildren()
          Get the children of this node.
 int getLength()
          Get the total length of the linear representation of the tree.
 AST getTree()
          Get the tree to which this break information belongs.
static int length(BreakInfo[] infos)
          Get sum of the lengths of the info nodes
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

compute

public static BreakInfo compute(AST tree,
                                boolean mathml)
Construct the line break information for the denoted tree.

Parameters:
tree - an abstract syntax tree.
mathml - true iff the mathml representation is considered.

getTree

public AST getTree()
Get the tree to which this break information belongs.

Returns:
the abstract syntax tree

getLength

public int getLength()
Get the total length of the linear representation of the tree.

Returns:
the length

getChildren

public java.util.Vector getChildren()
Get the children of this node.

Returns:
a vector holding BreakInfo objects and BreakInfo[] arrays.

length

public static int length(BreakInfo[] infos)
Get sum of the lengths of the info nodes