|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.tonbeller.jpivot.util.TreeNode
public class TreeNode
Tree Node for the for a general tree of Objects
Constructor Summary | |
---|---|
TreeNode(java.lang.Object obj)
cTtor |
Method Summary | |
---|---|
void |
addChildNode(TreeNode child)
add child node |
TreeNode |
deepCopy()
deep copy (clone) |
TreeNode |
deepCopyPrune(int depth)
deep copy (clone) and prune |
java.util.List |
getChildren()
|
int |
getLevel()
|
TreeNode |
getParent()
|
java.lang.Object |
getReference()
|
void |
remove()
remove node from tree |
void |
setReference(java.lang.Object object)
set reference object |
int |
walkChildren(TreeNodeCallback callbackHandler)
walk through children subtrees of this node |
int |
walkTree(TreeNodeCallback callbackHandler)
walk through subtree of this node |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TreeNode(java.lang.Object obj)
obj
- referenced objectMethod Detail |
---|
public void remove()
public void addChildNode(TreeNode child)
child
- node to be addedpublic TreeNode deepCopy()
public TreeNode deepCopyPrune(int depth)
depth
- - number of child levels to be copied
public int getLevel()
public int walkTree(TreeNodeCallback callbackHandler)
callbackHandler
- function called on iterationpublic int walkChildren(TreeNodeCallback callbackHandler)
callbackHandler
- function called on iterationpublic java.util.List getChildren()
public TreeNode getParent()
public java.lang.Object getReference()
public void setReference(java.lang.Object object)
object
- reference
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |