public interface Tree extends Serializable, UnitsProvider
DAYS, EXPECTED_SUBSTITUTIONS, GENERATIONS, MONTHS, SHORT_UNIT_NAMES, UNIT_NAMES, UNKNOWN, YEARS
Modifier and Type | Method and Description |
---|---|
void |
createNodeList()
This method is called to ensure that the calls to other methods in this
interface are valid.
|
Object |
getAttribute(Node node,
String name) |
Tree |
getCopy() |
Node |
getExternalNode(int i) |
int |
getExternalNodeCount() |
Node |
getInternalNode(int i) |
int |
getInternalNodeCount() |
Node |
getRoot() |
int |
getUnits()
Gets the units that this tree's branch lengths and node heights are
expressed in.
|
void |
setAttribute(Node node,
String name,
Object value)
Sets an named attribute for a given node.
|
void |
setRoot(Node root)
This method constructs a tree from the given root node.
|
int |
whichIdNumber(Taxon t) |
Node getRoot()
void setRoot(Node root)
root
- the root node of the tree to construct.int getExternalNodeCount()
int getInternalNodeCount()
Node getExternalNode(int i)
Node getInternalNode(int i)
void createNodeList()
int getUnits()
getUnits
in interface UnitsProvider
int whichIdNumber(Taxon t)
void setAttribute(Node node, String name, Object value)
node
- the node whose attribute is being set.name
- the name of the attribute.value
- the new value of the attribute.Object getAttribute(Node node, String name)
node
- the node being interrogated.name
- the name of the attribute of interest.Tree getCopy()
Copyright © 2018. All rights reserved.