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 void
addChild(MetaMenu data)
static MenuNode
buildTree(List<MetaMenu> metaMenus)
Build N-ary Tree from list of meta menusList<MenuNode>
getChildren()
MetaMenu
getMetaMenu()
boolean
isLeaf()
boolean
isRoot()
MenuNode
searchNode(MetaMenu target)
Search for a node with the givenMetaMenu
.void
traverse(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
-
-