org.biojavax.bio.phylo.tree
Class DefaultRootedTreeNode
java.lang.Object
org.biojavax.bio.phylo.tree.DefaultRootedTreeNode
- All Implemented Interfaces:
- Node, RootedTreeNode
public class DefaultRootedTreeNode
- extends java.lang.Object
- implements RootedTreeNode
- Version:
- $Id: DefaultRootedTreeNode.java,v 1.2 2006/12/13 17:46:21 tobias Exp $
created on 12.12.2006 15:13:22
- Author:
- Tobias Thierer
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultRootedTreeNode
public DefaultRootedTreeNode()
addChild
public void addChild(Node node)
- Calls addBranch(new SimpleBranch(this, node)).
- Specified by:
addChild
in interface RootedTreeNode
- Parameters:
node
- New child node to add
getChildren
public java.util.Collection getChildren()
- Specified by:
getChildren
in interface RootedTreeNode
getParent
public RootedTreeNode getParent()
- Specified by:
getParent
in interface RootedTreeNode
getSubtreeSize
public int getSubtreeSize()
- Specified by:
getSubtreeSize
in interface RootedTreeNode
setParentBranch
public void setParentBranch(Branch parentBranch)
- Specified by:
setParentBranch
in interface RootedTreeNode
getParentBranch
public Branch getParentBranch()
- Specified by:
getParentBranch
in interface RootedTreeNode
addBranch
public void addBranch(Branch branch)
- Specified by:
addBranch
in interface Node
getBranches
public java.util.Collection getBranches()
- Description copied from interface:
Node
- If this is a RootedTreeNode, then this Collection's iterator
is guaranteed to return the parent node first (if there is one).
- Specified by:
getBranches
in interface Node
- Returns:
- all branches adjacent to this node
isLeaf
public boolean isLeaf()
- Specified by:
isLeaf
in interface RootedTreeNode