public class ArrayListNode extends java.lang.Object implements TreeNode
Modifier and Type | Field and Description |
---|---|
java.util.ArrayList<TreeNode> |
children |
(package private) java.lang.String |
name |
(package private) java.lang.Object |
parent |
Constructor and Description |
---|
ArrayListNode(java.lang.Object p,
java.lang.String sn) |
Modifier and Type | Method and Description |
---|---|
void |
addChild(ArrayListNode arn) |
void |
clearChildren() |
java.lang.Object |
getChild(int index) |
int |
getChildCount() |
int |
getIndexOfChild(java.lang.Object child) |
java.lang.Object |
getParent() |
boolean |
hasChildren() |
boolean |
isLeaf() |
void |
removeChild(ArrayListNode arn) |
void |
setChildren(java.util.ArrayList<? extends TreeNode> arl) |
java.lang.String |
toString() |
public java.util.ArrayList<TreeNode> children
java.lang.String name
java.lang.Object parent
public java.lang.String toString()
toString
in class java.lang.Object
public void setChildren(java.util.ArrayList<? extends TreeNode> arl)
public void clearChildren()
public void addChild(ArrayListNode arn)
public void removeChild(ArrayListNode arn)
public boolean hasChildren()
public int getChildCount()
getChildCount
in interface TreeNode
public int getIndexOfChild(java.lang.Object child)
getIndexOfChild
in interface TreeNode
Copyright © 2013. All Rights Reserved.