byucc.jhdl.base
Class NodeList

java.lang.Object
  extended bybyucc.jhdl.base.list.TreeList
      extended bybyucc.jhdl.base.NodeList
All Implemented Interfaces:
List

public class NodeList
extends TreeList

This keeps a list of nodes. It describes a modified tree structure: each Node keeps track of its sibling and first child, and current refers to the current child. Anyone can read the children of a node, similar to regular LinkedLists or Enumerations.

Author:
Eric Blake

Constructor Summary
NodeList()
           
 
Method Summary
 Cell getCell()
          Returns the node pointed to by the current pointer as a Cell, if possible.
 Node getNode()
          Returns the node pointed to by the current pointer.
 
Methods inherited from class byucc.jhdl.base.list.TreeList
append, atEnd, delete, elementCount, elements, empty, getElt, init, inList, inList, insert, next, prev, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NodeList

public NodeList()
Method Detail

getNode

public final Node getNode()
Returns the node pointed to by the current pointer.

Returns:
the current node.

getCell

public final Cell getCell()
Returns the node pointed to by the current pointer as a Cell, if possible.

Returns:
the current node, cast to Cell
Throws:
java.lang.ClassCastException - if the current pointer is not a Cell


Copyright ? 2006 Brigham Young University, Configurable Computing Laboratory. All Rights Reserved.