Class FtcChoiceMenu.ChoiceItem

java.lang.Object
ftclib.driverio.FtcChoiceMenu.ChoiceItem
Enclosing class:
FtcChoiceMenu<T>

private class FtcChoiceMenu.ChoiceItem extends Object
This class defines a choice item in a choice menu.
  • Field Details

    • choiceText

      private final String choiceText
    • choiceObject

      private final T choiceObject
    • childMenu

      private final FtcMenu childMenu
  • Constructor Details

    • ChoiceItem

      public ChoiceItem(String choiceText, T choiceObject, FtcMenu childMenu)
      Constructor: Creates an instance of the object.
      Parameters:
      choiceText - specifies the text to be displayed in the choice menu.
      choiceObject - specifies the object to be returned if the choice is selected.
      childMenu - specifies the next menu to go to if the choice is selected. It can be null if this is the end (i.e. leaf node of the menu tree).
  • Method Details

    • getText

      public String getText()
      This method returns the choice text.
      Returns:
      choice text.
    • getObject

      public T getObject()
      This method returns the choice object.
      Returns:
      choice object.
    • getChildMenu

      public FtcMenu getChildMenu()
      This method returns the child menu.
      Returns:
      child menu.