Constructor and Description |
---|
PhyloTree(StringBuffer xml)
The standard constructor for the interface
Storable . |
PhyloTree(String name,
PhyloNode root)
Construct an instance of the class PhyloTree
|
Modifier and Type | Method and Description |
---|---|
PhyloTree |
clone() |
ArrayList<PhyloNode> |
getAllLeafs()
This method returns a list of
PhyloNode s that represent the leafs of the tree |
String |
getName()
This method returns the name of the PhyloTree
|
int |
getNumberOfNodes()
This method returns the total number of nodes in the tree
|
PhyloNode |
getRoot()
This method returns the root node of the tree
|
StringBuffer |
toXML()
This method returns an XML representation as
StringBuffer of an
instance of the implementing class. |
public PhyloTree(String name, PhyloNode root)
name
- the name of the PhyloTreeroot
- the root nodepublic PhyloTree(StringBuffer xml) throws NonParsableException
Storable
.
Constructs a PhyloTree
out of an XML representation.xml
- the XML representation as StringBuffer
NonParsableException
- if the PhyloTree
could not be reconstructed out of
the StringBuffer
xml
public PhyloTree clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
public String getName()
public PhyloNode getRoot()
public int getNumberOfNodes()
public ArrayList<PhyloNode> getAllLeafs()
PhyloNode
s that represent the leafs of the treepublic StringBuffer toXML()
Storable
StringBuffer
of an
instance of the implementing class.