code: public Optional<MenuItem> getMenuById(SubMenuItem root, int id) {
          return getMenuItems(root).stream().filter(item -> item.getId() == id).findFirst();
      }
docs: Gets the menu item with the specified ID, in a given submenu. If you don't know the sub menu call the findMenuItem
  to obtain the parent.
  @param root the sub menu
  @param id the id of the object to find.
  @return