Package org.smallmind.nutsnbolts.util
Class TreeNode
- java.lang.Object
-
- org.smallmind.nutsnbolts.util.TreeNode
-
- All Implemented Interfaces:
Serializable,Cloneable,MutableTreeNode,TreeNode
public class TreeNode extends Object implements Cloneable, Serializable, MutableTreeNode
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected LinkedList<TreeNode>childList
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(MutableTreeNode child)Enumerationchildren()booleangetAllowsChildren()TreeNodegetChildAt(int childIndex)intgetChildCount()intgetIndex(TreeNode node)TreeNodegetNextInThread()TreeNodegetParent()TreeNodegetPrevInThread()TreePathgetTreePath()ObjectgetUserObject()intgetUserObjectIndex(Object childUserObject)voidinsert(MutableTreeNode child, int childIndex)booleanisLeaf()voidremove(int childIndex)voidremove(MutableTreeNode child)voidremoveFromParent()voidset(MutableTreeNode child, int childIndex)voidsetAllowsChildren(boolean newAllowsChildren)voidsetParent(MutableTreeNode parent)voidsetUserObject(Object userObject)voidsortChildren(Comparator<TreeNode> sort)StringtoString()
-
-
-
Field Detail
-
childList
protected LinkedList<TreeNode> childList
-
-
Method Detail
-
getAllowsChildren
public boolean getAllowsChildren()
- Specified by:
getAllowsChildrenin interfaceTreeNode
-
setAllowsChildren
public void setAllowsChildren(boolean newAllowsChildren)
-
children
public Enumeration children()
-
getChildAt
public TreeNode getChildAt(int childIndex)
- Specified by:
getChildAtin interfaceTreeNode
-
getChildCount
public int getChildCount()
- Specified by:
getChildCountin interfaceTreeNode
-
getUserObjectIndex
public int getUserObjectIndex(Object childUserObject)
-
setParent
public void setParent(MutableTreeNode parent)
- Specified by:
setParentin interfaceMutableTreeNode
-
getUserObject
public Object getUserObject()
-
setUserObject
public void setUserObject(Object userObject)
- Specified by:
setUserObjectin interfaceMutableTreeNode
-
sortChildren
public void sortChildren(Comparator<TreeNode> sort)
-
getPrevInThread
public TreeNode getPrevInThread()
-
getNextInThread
public TreeNode getNextInThread()
-
getTreePath
public TreePath getTreePath()
-
add
public void add(MutableTreeNode child)
-
insert
public void insert(MutableTreeNode child, int childIndex)
- Specified by:
insertin interfaceMutableTreeNode
-
set
public void set(MutableTreeNode child, int childIndex)
-
remove
public void remove(int childIndex)
- Specified by:
removein interfaceMutableTreeNode
-
remove
public void remove(MutableTreeNode child)
- Specified by:
removein interfaceMutableTreeNode
-
removeFromParent
public void removeFromParent()
- Specified by:
removeFromParentin interfaceMutableTreeNode
-
-