Interface Option

All Known Implementing Classes:
AcceptBlindOption, CardSelectOption, DeckSelectOption, DeckViewOption, DiscardCardOption, ExitGameOption, HelpHowOption, HelpIntroOption, HelpMenuOption, HelpRulesOption, HelpTipsOption, MainMenuOption, NextRoundOption, PlayCardOption, PokerHandOption, RejectBlindOption, ResumeGameOption, ReturnOption, RunSelectOption, SortByRankOption, SortBySuitOption, StartGameOption, StartRunOption, ViewNextRunOption, ViewPrevRunOption, ViewRunListOption, ViewRunOption

public interface Option
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Executes the command.
    default String
    Retrieves a description of the command.
    default void
    setDescription(String description)
    Updates the description of the command.
  • Method Details

    • getDescription

      default String getDescription()
      Retrieves a description of the command. This method has a default implementation returning an empty string.
      Returns:
      A string representing the command description.
    • execute

      void execute() throws JavatroException
      Executes the command. Implementing classes must define specific behavior.
      Throws:
      JavatroException - If an error occurs during execution.
    • setDescription

      default void setDescription(String description)
      Updates the description of the command. Default implementation does nothing.
      Parameters:
      description - The new description to set.