public final class ItemTreeToolkit extends Object
| Constructor and Description |
|---|
ItemTreeToolkit() |
| Modifier and Type | Method and Description |
|---|---|
static void |
appendLayeredBreakdown(StringBuilder report,
ITreeNode<IItem> root,
int maxDepth)
Reports all encapsulation layers.
|
static void |
appendLongestBreakdown(StringBuilder report,
ITreeNode<IItem> root)
Renders a report of the longest encapsulating event chain.
|
static int |
getDepth(ITreeNode<?> node)
Returns the number of ancestors the node has.
|
static String |
printTree(ITreeNode<IItem> node) |
public static String printTree(ITreeNode<IItem> node)
public static void appendLongestBreakdown(StringBuilder report, ITreeNode<IItem> root)
If we have A -> (B->D, C->E) and B has longer duration than C, the report will be A => B => D.
report - the report to write toroot - the root node to start frompublic static void appendLayeredBreakdown(StringBuilder report, ITreeNode<IItem> root, int maxDepth)
If A -> (B->D, C->E), the report will show:
report - the report to write toroot - the root node to start the analysis frommaxDepth - maximum number of layers to analyzepublic static int getDepth(ITreeNode<?> node)
node - the node for which to calculate the depthCopyright © 2020. All rights reserved.