public class CallTreeNode extends Object
Constructor and Description |
---|
CallTreeNode(String name)
Main constructor.
|
Modifier and Type | Method and Description |
---|---|
CallTreeNode |
addChild(String name)
Adds a child to this tree node.
|
void |
addSplit(Split split)
Adds a split to the current tree node.
|
CallTreeNode |
getChild(String name)
Returns the child node by Simon name.
|
Collection<CallTreeNode> |
getChildren()
Returns all child nodes.
|
String |
getName()
Returns Simon name.
|
CallTreeNode |
getOrAddChild(String name)
Returns a child node with given name or creates it if it does not exists.
|
CallTreeNode |
getParent()
Returns parent tree node.
|
Integer |
getPercent()
Returns the part of time spent in this node compared to parent.
|
int |
getSplitCount()
Returns the number of splits in this node.
|
long |
getTotal()
Returns the total time of splits using
Split.runningFor() . |
void |
print(PrintWriter printWriter)
Recursively prints this tree node to given print writer.
|
String |
toString()
Returns a string representing the tree from this tree node, visiting recursively this tree branch.
|
public CallTreeNode(String name)
name
- Simon namepublic void addSplit(Split split)
split
- Splitpublic int getSplitCount()
public long getTotal()
Split.runningFor()
.public Integer getPercent()
public CallTreeNode addChild(String name)
name
- Child Simon namepublic CallTreeNode getChild(String name)
name
- Simon namepublic Collection<CallTreeNode> getChildren()
public CallTreeNode getOrAddChild(String name)
name
- Simon namepublic CallTreeNode getParent()
public void print(PrintWriter printWriter)
printWriter
- Output print writerCopyright © 2019. All rights reserved.