de.dante.extex.typesetter.type.noad
Class MathList

java.lang.Object
  extended byde.dante.extex.typesetter.type.noad.AbstractNoad
      extended byde.dante.extex.typesetter.type.noad.MathList
All Implemented Interfaces:
Noad

public class MathList
extends AbstractNoad

This class provides a container for Noads and Nodes.

Version:
$Revision: 1.21 $
Author:
Gerd Neugebauer
See Also:
"TTP [???]"

Constructor Summary
MathList()
          Creates a new object without any items.
 
Method Summary
 void add(Noad noad)
          Add an arbitrary knot to the list.
 boolean empty()
          Test whether the node list is empty.
 Noad get(int index)
          Getter for a node at a given position.
 Noad getLastNoad()
          Getter for the last noad previously stored.
 Noad remove(int index)
          Remove an element at a given position.
 int size()
          Return the size of the MathList.
 java.lang.String toString()
           
 void toString(java.lang.StringBuffer sb)
          Produce a printable representation of the noad in a StringBuffer.
 void toString(java.lang.StringBuffer sb, int depth)
          Produce a printable representation to a certain depth of the noad.
 void typeset(Noad previousNoad, NoadList noads, int index, NodeList list, MathContext mathContext, java.util.logging.Logger logger)
          Translate a Noad into a NodeList.
 
Methods inherited from class de.dante.extex.typesetter.type.noad.AbstractNoad
getLocalizer, getSpacingClass, getSubscript, getSuperscript, makeScripts, rebox, setSpacingClass, setSubscript, setSuperscript, toStringAdd, toStringSubsidiaray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MathList

public MathList()
Creates a new object without any items.

Method Detail

add

public void add(Noad noad)
Add an arbitrary knot to the list.

Parameters:
noad - the noad to add

empty

public boolean empty()
Test whether the node list is empty.

Returns:
true, if the list is empty, otherwise false.

get

public Noad get(int index)
Getter for a node at a given position.

Parameters:
index - the position
Returns:
the node at position index of null if index is out of bounds

getLastNoad

public Noad getLastNoad()
Getter for the last noad previously stored.

Returns:
the last noad or null if none is available

remove

public Noad remove(int index)
Remove an element at a given position.

Parameters:
index - the position
Returns:
the element previously located at position index

size

public int size()
Return the size of the MathList.

Returns:
the size of the MathList

toString

public java.lang.String toString()
Overrides:
toString in class AbstractNoad
See Also:
Object.toString()

toString

public void toString(java.lang.StringBuffer sb)
Description copied from interface: Noad
Produce a printable representation of the noad in a StringBuffer.

Specified by:
toString in interface Noad
Overrides:
toString in class AbstractNoad
See Also:
Noad.toString( java.lang.StringBuffer)

toString

public void toString(java.lang.StringBuffer sb,
                     int depth)
Description copied from interface: Noad
Produce a printable representation to a certain depth of the noad.

Specified by:
toString in interface Noad
Overrides:
toString in class AbstractNoad
See Also:
Noad.toString( java.lang.StringBuffer, int)

typeset

public void typeset(Noad previousNoad,
                    NoadList noads,
                    int index,
                    NodeList list,
                    MathContext mathContext,
                    java.util.logging.Logger logger)
             throws TypesetterException,
                    ConfigurationException
Description copied from interface: Noad
Translate a Noad into a NodeList.

Parameters:
previousNoad - the previous noad
noads - the list of noads currently processed
index - the index of the current node in the list
list - the list to add the nodes to. This list contains the Nodes previously typeset. Thus it can be used to look back
mathContext - the context to consider
logger - the logger for debugging and tracing information
Throws:
ConfigurationException - in case of a configuration problem
TypesetterException - in case of a problem
See Also:
Noad.typeset( de.dante.extex.typesetter.type.noad.Noad, de.dante.extex.typesetter.type.noad.NoadList, int, de.dante.extex.typesetter.type.NodeList, de.dante.extex.typesetter.type.noad.util.MathContext, java.util.logging.Logger)