|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.jstacs.models.phylo.PhyloNode
public class PhyloNode
This class implements a node in a PhyloTree
A PhyloNode contains some basic informations of itself and the incoming edge
Furthermore it contains a list of PhyloNodes that represent the children nodes
| Constructor Summary | |
|---|---|
PhyloNode()
Basic constructor |
|
PhyloNode(StringBuffer xml)
The standard constructor for the interface Storable. |
|
| Method Summary | |
|---|---|
void |
addChild(PhyloNode node)
This method adds a children node to the current instance |
PhyloNode |
clone()
|
ArrayList<PhyloNode> |
getAllLeafs()
This method returns a list of PhyloNodes that are leafs in the subtree starting from this instance |
ArrayList<PhyloNode> |
getChildrenNodes()
This method returns a list of PhyloNodes that are children of this instance |
int |
getId()
This method returns the ID of the current PhyloNode |
String |
getName()
This method returns the name of the current instance |
int |
getNumberOfAllNodesBelow()
This method returns the total number of PhyloNodes in the subtree starting from this instance |
double |
getWeight()
This method return the weight (length, rate ...) for the incoming edge |
void |
setId(int id)
This method set the ID of the current PhyloNode The ID should be unique in the PhyloTree |
void |
setName(String name)
This method set a name for the current instance |
void |
setWeight(double w)
This method set the weight (length, rate ...) for the incoming edge |
StringBuffer |
toXML()
This method returns an XML representation as StringBuffer of an
instance of the implementing class. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PhyloNode()
public PhyloNode(StringBuffer xml)
throws NonParsableException
Storable.
Constructs a PhyloNode out of an XML representation.
xml - the XML representation as StringBuffer
NonParsableException - if the PhyloNode could not be reconstructed out of
the StringBuffer xml| Method Detail |
|---|
public PhyloNode clone()
throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionpublic void addChild(PhyloNode node)
node - the children nodepublic void setName(String name)
name - the name of the PhyloNodepublic String getName()
public void setId(int id)
id - the ID of the nodepublic int getId()
public void setWeight(double w)
w - the weightpublic double getWeight()
public int getNumberOfAllNodesBelow()
PhyloNodes in the subtree starting from this instance
public ArrayList<PhyloNode> getChildrenNodes()
PhyloNodes that are children of this instance
public ArrayList<PhyloNode> getAllLeafs()
PhyloNodes that are leafs in the subtree starting from this instance
public StringBuffer toXML()
StorableStringBuffer of an
instance of the implementing class.
toXML in interface Storable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||