|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.biojavax.bio.phylo.tree.DefaultRootedTree
public class DefaultRootedTree
Constructor Summary | |
---|---|
DefaultRootedTree()
Constructs an empty rooted tree |
|
DefaultRootedTree(RootedTreeNode root)
Constructs a rooted tree with the given root node. |
Method Summary | |
---|---|
void |
addBranch(Branch branch)
Adds a branch to the tree. |
Tree |
asUnrooted()
|
Collection |
getNodes()
|
RootedTreeNode |
getRoot()
|
boolean |
isEmpty()
|
boolean |
isRoot(RootedTreeNode node)
|
Iterator |
iterator()
An iterator over the nodes of this tree. |
Iterator |
postOrderIterator()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultRootedTree()
public DefaultRootedTree(RootedTreeNode root)
root
- root node of the tree to construct. If this
node already has children, these automatically become part
of the tree, but they aren't copied. If root is another
tree's root, this will just create a new view on the other
tree, i.e. a new tree that shares all nodes with the old one.Method Detail |
---|
public boolean isRoot(RootedTreeNode node)
isRoot
in interface RootedTree
public Collection getNodes()
getNodes
in interface RootedTree
public RootedTreeNode getRoot()
getRoot
in interface RootedTree
public Tree asUnrooted()
asUnrooted
in interface RootedTree
public final Iterator postOrderIterator()
postOrderIterator
in interface RootedTree
public Iterator iterator()
Tree
iterator
in interface Tree
postOrderIterator()
public void addBranch(Branch branch)
Tree
addBranch
in interface Tree
public final boolean isEmpty()
isEmpty
in interface Tree
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |