Class SendableChooser<V>

    • Method Detail

      • addOption

        public void addOption​(String name,
                              V object)
        Adds the given object to the list of options. On the SmartDashboard on the desktop, the object will appear as the given name.
        Parameters:
        name - the name of the option
        object - the option
      • setDefaultOption

        public void setDefaultOption​(String name,
                                     V object)
        Adds the given object to the list of options and marks it as the default. Functionally, this is very close to addOption(String, Object) except that it will use this as the default option if none other is explicitly selected.
        Parameters:
        name - the name of the option
        object - the option
      • getSelected

        public V getSelected()
        Returns the selected option. If there is none selected, it will return the default. If there is none selected and no default, then it will return null.
        Returns:
        the option selected