org.omnaest.utils.structure.hierarchy.tree
Class TreeHelper

java.lang.Object
  extended by org.omnaest.utils.structure.hierarchy.tree.TreeHelper

public class TreeHelper
extends Object

Helper for Tree instances

Author:
Omnaest

Constructor Summary
TreeHelper()
           
 
Method Summary
static
<M,TN extends TreeNode<M>,T extends Tree<M,TN>>
Map<M,List<M>>
treeNodeModelToChildrenTreeNodeModelListMap(T tree)
          Similar to treeNodeToChildrenTreeNodeListMap(Tree) but for the model of the TreeNodes
static
<M,TN extends TreeNode<M>,T extends Tree<M,TN>>
Map<TN,List<TN>>
treeNodeToChildrenTreeNodeListMap(T tree)
          Returns a Map containing all TreeNodes of the hierarchy of a given Tree mapped to a List of all children TreeNodes for each key node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeHelper

public TreeHelper()
Method Detail

treeNodeModelToChildrenTreeNodeModelListMap

public static <M,TN extends TreeNode<M>,T extends Tree<M,TN>> Map<M,List<M>> treeNodeModelToChildrenTreeNodeModelListMap(T tree)
Similar to treeNodeToChildrenTreeNodeListMap(Tree) but for the model of the TreeNodes

Parameters:
tree -
Returns:

treeNodeToChildrenTreeNodeListMap

public static <M,TN extends TreeNode<M>,T extends Tree<M,TN>> Map<TN,List<TN>> treeNodeToChildrenTreeNodeListMap(T tree)
Returns a Map containing all TreeNodes of the hierarchy of a given Tree mapped to a List of all children TreeNodes for each key node.

Parameters:
tree -
Returns:


Copyright © 2013. All Rights Reserved.