forked from plusone/plusone-commons
优化代码。
This commit is contained in:
@@ -124,10 +124,8 @@ class MenuList extends Menu {
|
||||
}
|
||||
|
||||
static MenuList of(String parentMenuCode, String menuCode, String title, Iterable<Menu> children, int orderNum) {
|
||||
MenuList instance = of(parentMenuCode, menuCode, title, orderNum);
|
||||
for (Menu child : children) {
|
||||
instance.addChild(child);
|
||||
}
|
||||
final MenuList instance = of(parentMenuCode, menuCode, title, orderNum);
|
||||
children.forEach(instance::addChild);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user