Package com.axelor.meta.service.menu
Class MenuNode
- java.lang.Object
-
- com.axelor.meta.service.menu.MenuNode
-
public class MenuNode extends Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddChild(MetaMenu data)static MenuNodebuildTree(List<MetaMenu> metaMenus)Build N-ary Tree from list of meta menusList<MenuNode>getChildren()MetaMenugetMetaMenu()booleanisLeaf()booleanisRoot()MenuNodesearchNode(MetaMenu target)Search for a node with the givenMetaMenu.voidtraverse(MenuNodeVisitor visitor)
-
-
-
Method Detail
-
addChild
public void addChild(MetaMenu data)
-
getMetaMenu
public MetaMenu getMetaMenu()
-
isRoot
public boolean isRoot()
-
isLeaf
public boolean isLeaf()
-
traverse
public void traverse(MenuNodeVisitor visitor)
-
buildTree
public static MenuNode buildTree(List<MetaMenu> metaMenus)
Build N-ary Tree from list of meta menus- Parameters:
metaMenus- list of meta menus- Returns:
- N-ary Tree
-
-