edu.unh.sdb.datasource
Class ARRSInternalNode

java.lang.Object
  extended by edu.unh.sdb.datasource.ARRSNode
      extended by edu.unh.sdb.datasource.ARRSInternalNode
Direct Known Subclasses:
KDNode, NTreeNode

public abstract class ARRSInternalNode
extends ARRSNode


Field Summary
protected  int firstChildId
           
protected  int lastChildId
           
protected  short numChildren
           
 
Fields inherited from class edu.unh.sdb.datasource.ARRSNode
baseBounds, cellSource, nodeId, path, siblingId
 
Constructor Summary
ARRSInternalNode()
          Constructor without argument
ARRSInternalNode(ARRSInternalNode src)
          Copy constructor
ARRSInternalNode(ISBounds bounds)
          Constructor takes a single ISBounds
ARRSInternalNode(ISBounds bounds, CellIndexable cellSource)
          Constructor takes a ISBounds and a CellIndexable
 
Method Summary
 boolean addChild(java.util.ArrayList treeNodes, ARRSNode node)
          Add a node as a child of this node.
 boolean addNode(java.util.ArrayList treeNodes, ARRSNode node, int parentId, int id, int max_child_num)
          Add a node as a child of this node.
 ARRSNode getChild(java.util.ArrayList tree, int i)
          Get the specified child
 int getChildID(java.util.ArrayList tree, int i)
          Get the id of the specified child
 ARRSNode[] getChildren(java.util.ArrayList tree)
          Get all the children
 int getFirstChildID()
          Get the first child's id
 int getLastChildID()
          Get the last child's id
 int getNumChildren()
          get number of children
abstract  int maxChildren()
          return maximum allowed number of children, determined by child class
 void setFirstChildID(int eldest)
          Set first child's id
 void setLastChildID(int youngest)
          Set last child's id
 
Methods inherited from class edu.unh.sdb.datasource.ARRSNode
copy, getBaseBounds, getCellIndexable, getID, getPath, getSibling, getSiblingID, setBaseBounds, setCellIndexable, setID, setNodePath, setSibling
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

firstChildId

protected int firstChildId

lastChildId

protected int lastChildId

numChildren

protected short numChildren
Constructor Detail

ARRSInternalNode

public ARRSInternalNode()
Constructor without argument


ARRSInternalNode

public ARRSInternalNode(ISBounds bounds)
Constructor takes a single ISBounds


ARRSInternalNode

public ARRSInternalNode(ISBounds bounds,
                        CellIndexable cellSource)
Constructor takes a ISBounds and a CellIndexable


ARRSInternalNode

public ARRSInternalNode(ARRSInternalNode src)
Copy constructor

Method Detail

maxChildren

public abstract int maxChildren()
return maximum allowed number of children, determined by child class


setFirstChildID

public void setFirstChildID(int eldest)
Set first child's id


getFirstChildID

public int getFirstChildID()
Get the first child's id


setLastChildID

public void setLastChildID(int youngest)
Set last child's id


getNumChildren

public int getNumChildren()
get number of children


getLastChildID

public int getLastChildID()
Get the last child's id


addChild

public boolean addChild(java.util.ArrayList treeNodes,
                        ARRSNode node)
Add a node as a child of this node.


addNode

public boolean addNode(java.util.ArrayList treeNodes,
                       ARRSNode node,
                       int parentId,
                       int id,
                       int max_child_num)
Add a node as a child of this node.


getChild

public ARRSNode getChild(java.util.ArrayList tree,
                         int i)
Get the specified child


getChildren

public ARRSNode[] getChildren(java.util.ArrayList tree)
Get all the children


getChildID

public int getChildID(java.util.ArrayList tree,
                      int i)
Get the id of the specified child