public class ARRSTree
extends java.lang.Object
Constructor and Description |
---|
ARRSTree()
Constructor without arguments
|
Modifier and Type | Method and Description |
---|---|
boolean |
addNode(ARRSNode node,
int parentId)
Add a node into an ARRS tree
|
void |
buildLeafList()
Traverse all the leaf cell block in a ARR tree
|
void |
buildTreePath()
Set the path of this tree
|
void |
clearLeafList()
Clear the list of leaf cell blocks
|
ARRSNode |
getChild(ARRSNode node,
int i)
Get one child of the specified node
|
ARRSNode[] |
getChildren(ARRSNode node)
Get all the children of the specified node
|
java.util.ArrayList<ARRSLeafNode> |
getLeafList()
Get the leaf cell block list
|
ARRSNode |
getNode(int id)
Find the node with id number
|
java.util.ArrayList |
getNodeList()
Get all the nodes in the tree
|
int |
getNumOfNodes()
Get the number of all the nodes in the tree
|
ARRSNode |
getSibling(ARRSNode node)
Get the sibling of the specified node
|
java.lang.String |
printNode(ARRSNode node)
Print the info of a node
|
java.lang.String |
printNode(int indent,
ARRSNode node)
Print the info of a node with some indent
|
java.lang.String |
toString()
Print the info of a tree
|
void |
treeClear()
Clear the ARRS tree
|
public boolean addNode(ARRSNode node, int parentId)
public void buildTreePath()
public ARRSNode getNode(int id)
public java.util.ArrayList getNodeList()
public int getNumOfNodes()
public java.util.ArrayList<ARRSLeafNode> getLeafList()
public void clearLeafList()
public void treeClear()
public void buildLeafList()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String printNode(ARRSNode node)
public java.lang.String printNode(int indent, ARRSNode node)