N - the kind of elements in the treepublic interface Tree<N>
| Modifier and Type | Method and Description | 
|---|---|
| void | dump(PrintWriter writer)Dump. | 
| void | dump(PrintWriter writer,
    int indent)Dump. | 
| List<N> | fillDepthFirst()Fill depth first. | 
| int | getChildCount()A convenience method that gets the number of child nodes that this node
 has. | 
| List<Tree<N>> | getChildren()Gets the children of this tree node. | 
| Object | getEdge(Tree<N> child) | 
| Tree<N> | getParent()Gets the parent of this tree node. | 
| List<Tree<N>> | getPathToRoot()Gets the path to root. | 
| Tree<N> | getRoot()A convenience method that gets the root of this tree. | 
| N | getUserObject()Gets the "content" of this tree node. | 
| Set<N> | getUserObjectClosure()Gets the user object closure. | 
| List<N> | getUserObjectPathToRoot()Gets the user object path to root. | 
| boolean | isLeaf()A convenience method that determines if this node is a leaf node (because
 it has no children). | 
| boolean | isRoot()A convenience method that determines if this is a root node (because it
 has no parent node). | 
| void | setNodeRenderer(NodeRenderer<N> renderer)Sets the node renderer. | 
| void | sortChildren(Comparator<Tree<N>> comparator)Sorts the children using the specified comparator. | 
@Nullable N getUserObject()
@Nullable Tree<N> getParent()
null if this node doesn't have a parent.List<Tree<N>> getChildren()
@Nullable Object getEdge(Tree<N> child)
child - the child to usevoid sortChildren(Comparator<Tree<N>> comparator)
comparator - The comparator to be used for the sorting.int getChildCount()
boolean isRoot()
true if this is a root node, otherwise false.boolean isLeaf()
true if this node is a leaf node otherwise false.Tree<N> getRoot()
List<N> getUserObjectPathToRoot()
void dump(PrintWriter writer)
writer - the writer to print tovoid dump(PrintWriter writer, int indent)
writer - the writer to print toindent - how much to indentvoid setNodeRenderer(NodeRenderer<N> renderer)
renderer - the renderer to useSet<N> getUserObjectClosure()
Copyright © 2020 The University of Manchester. All rights reserved.