Package com.axelor.meta.service.menu
Class MenuNode
java.lang.Object
com.axelor.meta.service.menu.MenuNode
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
static MenuNode
Build N-ary Tree from list of meta menusboolean
isLeaf()
boolean
isRoot()
searchNode
(MetaMenu target) Search for a node with the givenMetaMenu
.void
traverse
(MenuNodeVisitor visitor)
-
Constructor Details
-
MenuNode
-
-
Method Details
-
getChildren
-
addChild
-
getMetaMenu
-
isRoot
public boolean isRoot() -
isLeaf
public boolean isLeaf() -
buildTree
Build N-ary Tree from list of meta menus- Parameters:
metaMenus
- list of meta menus- Returns:
- N-ary Tree
-
searchNode
Search for a node with the givenMetaMenu
. It searches in the current node, in all children, their children's children and so on- Parameters:
target
- the meta menu to search- Returns:
- the found node
-