public class TreeLevel extends Object
| Constructor and Description |
|---|
TreeLevel()
No-arg constructor.
|
TreeLevel(int index)
"Parent" constructor.
|
TreeLevel(TreeLevel parent)
"Child" constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected int |
addChild(TreeLevel child)
Utility reciprocal method to add a child when it chooses this as its parent.
|
List |
getChildren()
Get list of all child TreeLevels
|
TreeLevel |
getParent()
Get parent, or self if no parent.
|
boolean |
isChild()
True if this has a parent.
|
static void |
main(String[] args)
test code, demonstrates usage.
|
String |
toString()
String representing 0-indexed parent-child relationships.
|
public TreeLevel(int index)
public TreeLevel()
public TreeLevel(TreeLevel parent)
parent - TreeLevelpublic TreeLevel getParent()
public List getChildren()
public boolean isChild()
public String toString()
protected int addChild(TreeLevel child)
child - TreeLevelpublic static void main(String[] args)
args - String[]Copyright © 2003–2014 University of Michigan. All rights reserved.