com.facetmap.simple
Class TreeNode
java.lang.Object
com.facetmap.simple.TreeNode
public class TreeNode
- extends java.lang.Object
Encapsulates basic tree functions, for use by backward-heading and
forward-heading computation.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
baseObject
protected java.lang.Object baseObject
parent
protected TreeNode parent
children
protected java.util.List children
TreeNode
public TreeNode(java.lang.Object baseObject)
TreeNode
public TreeNode(java.lang.Object baseObject,
TreeNode parent)
TreeNode
public TreeNode(java.lang.Object baseObject,
TreeNode parent,
int indexWithinParent)
getForwardNodes
public java.util.Iterator getForwardNodes()
getForwardObjects
public java.util.Iterator getForwardObjects()
getParent
public TreeNode getParent()
getParentObject
public java.lang.Object getParentObject()
getBaseObject
public java.lang.Object getBaseObject()
getChildCount
public int getChildCount()
hasChildren
public boolean hasChildren()
adopt
public void adopt(TreeNode child)
- Assign the specified node as a child of this node. This is a
bidirectional link; the specified child will have this node
assigned as its parent.
claimParent
public void claimParent(TreeNode claimedParent)
- Make this TreeNode claim a parent TreeNode, without making the parent
adopt this TreeNode as a child. This is important for anonymous
headings.
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object