public class CommunicationSummaryTreeBuilder extends Object
| Constructor and Description |
|---|
CommunicationSummaryTreeBuilder() |
| Modifier and Type | Method and Description |
|---|---|
static Collection<CommunicationSummaryStatistics> |
buildCommunicationSummaryTree(Collection<CommunicationSummaryStatistics> nodes)
This method returns the supplied list of flat nodes as a set of tree structures with related nodes.
|
protected static Collection<CommunicationSummaryStatistics> |
getRootCommunicationSummaryNodes(Map<String,CommunicationSummaryStatistics> nodeMap)
This method returns the subset of supplied nodes that are root nodes.
|
protected static void |
initCommunicationSummaryTreeNode(CommunicationSummaryStatistics node,
Map<String,CommunicationSummaryStatistics> nodeMap,
List<String> usedIds)
This method recursively builds the communication summary tree, using the supplied node map,
taking copies of each node to ensure the original list is not modified as some of the nodes
may be shared between multiple trees.
|
public static Collection<CommunicationSummaryStatistics> buildCommunicationSummaryTree(Collection<CommunicationSummaryStatistics> nodes)
nodes - The collection of nodes represented as a flat listprotected static void initCommunicationSummaryTreeNode(CommunicationSummaryStatistics node, Map<String,CommunicationSummaryStatistics> nodeMap, List<String> usedIds)
node - The current nodenodeMap - The map of possible nodesusedIds - The list of node ids already included in the treeprotected static Collection<CommunicationSummaryStatistics> getRootCommunicationSummaryNodes(Map<String,CommunicationSummaryStatistics> nodeMap)
nodeMap - The map of all nodesCopyright © 2015–2016 Red Hat, Inc.. All rights reserved.