Class WeightedTreeSet<N,E>
java.lang.Object
org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.WeightedTreeSet<N,E>
- Type Parameters:
N
- The type of objects represented by each node in the treeE
- The type of elements used to group the trees. If this type extendsITree
, then the elements and their associated weighted trees will be grouped in a hierarchical style
- All Implemented Interfaces:
IWeightedTreeSet<N,
E, WeightedTree<N>>
public class WeightedTreeSet<@NonNull N,E>
extends Object
implements IWeightedTreeSet<N,E,WeightedTree<N>>
An implementation of the weighted tree set, with generic types and nodes
- Author:
- Geneviève Bastien
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addWeightedTree
(E dstGroup, WeightedTree<@NonNull N> tree) Add a weighted tree for an element in this set.Get the elements under which are the weighted trees.Collection<@NonNull WeightedTree<N>>
getTreesFor
(Object element) Get the weighted trees for a given elementMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.IWeightedTreeSet
getExtraDataSets, getTreesForNamed
-
Constructor Details
-
WeightedTreeSet
public WeightedTreeSet()
-
-
Method Details
-
getElements
Description copied from interface:IWeightedTreeSet
Get the elements under which are the weighted trees. It can be a single constant element if this treeset does not have the concept of grouping the trees.- Specified by:
getElements
in interfaceIWeightedTreeSet<N,
E, WeightedTree<N>> - Returns:
- The elements used to group the trees
-
getTreesFor
Description copied from interface:IWeightedTreeSet
Get the weighted trees for a given element- Specified by:
getTreesFor
in interfaceIWeightedTreeSet<N,
E, WeightedTree<N>> - Parameters:
element
- The element for which to get the trees- Returns:
- A collection of weighted trees for the requested element
-
addWeightedTree
Add a weighted tree for an element in this set. If a tree for the same object already exists, their data will be merged.- Parameters:
dstGroup
- The group to which to add this treetree
- The weighted tree to add to this set. This tree may be modified and merged with others, so it should not be a tree that is part of another tree (for groupings or diff or other operations for instance)
-