Class ItemTreeBuilder


  • public class ItemTreeBuilder
    extends Object
    Helper for building item trees.
    • Constructor Detail

      • ItemTreeBuilder

        public ItemTreeBuilder()
    • Method Detail

      • buildEncapsulationTree

        public static ITreeNode<IItem> buildEncapsulationTree​(IItemCollection items,
                                                              boolean allowInstants)
        Builds a tree where events that wrap other events, time wise, are higher up in the hierarchy.
        Parameters:
        items - the items to build a tree from
        allowInstants - true to allow instant events in the resulting tree
        Returns:
        the root node for the resulting tree
      • buildEncapsulationTree

        public static ITreeNode<IItem> buildEncapsulationTree​(IItemCollection items,
                                                              boolean allowInstants,
                                                              boolean ignoreThread)
        Builds a tree where events that wrap other events, time wise, are higher up in the hierarchy.
        Parameters:
        items - the items to build a tree from
        allowInstants - true to allow instant events in the resulting tree
        ignoreThread - true to make the algorithm not care about event thread, can be used for VM level events. It's up to the caller to make sure this is safe to do.
        Returns:
        the root node for the resulting tree.
      • buildEncapsulationTree

        public static ITreeNode<IItem> buildEncapsulationTree​(IItemCollection items,
                                                              boolean allowInstants,
                                                              boolean ignoreThread,
                                                              ItemTreeBuilder.IItemTreeBuilderCallback callback)
        Builds a tree where events that wrap other events, time wise, are higher up in the hierarchy.
        Parameters:
        items - the items to build a tree from
        allowInstants - true to allow instant events in the resulting tree
        ignoreThread - true to make the algorithm not care about event thread, can be used for VM level events. It's up to the caller to make sure this is safe to do.
        callback - callback used to determine whether or not to continue building the encapsulation tree
        Returns:
        the root node for the resulting tree.