| 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
PhyloNodes 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 StringBufferNonParsableException - if the PhyloTree could not be reconstructed out of
the StringBuffer xmlpublic PhyloTree clone() throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionpublic String getName()
public PhyloNode getRoot()
public int getNumberOfNodes()
public ArrayList<PhyloNode> getAllLeafs()
PhyloNodes that represent the leafs of the treepublic StringBuffer toXML()
StorableStringBuffer of an
instance of the implementing class.