Class Menu

java.lang.Object
blockly_robot.robot.logic.menu.Menu

public class Menu extends Object
Represents a menu that contains main and sub menus. The menu data is loaded from a JSON file.
  • Constructor Details

    • Menu

      public Menu()
      Constructs a Menu object and loads the menu data from a JSON file.
  • Method Details

    • getMain

      Returns the main menu.
      Returns:
      the main menu as a LinkedHashMap
    • getSub

      public LinkedHashMap<String,String> getSub(String menu)
      Returns the sub menu for the specified main menu.
      Parameters:
      menu - the main menu
      Returns:
      the sub menu as a LinkedHashMap
    • getId

      public String getId(String menu, String submenu)
      Returns the ID of the specified submenu in the specified main menu.
      Parameters:
      menu - the main menu
      submenu - the submenu
      Returns:
      the ID of the submenu as a String