Interface ParentCommand


public interface ParentCommand
  • Method Details

    • getName

      String getName()
      Get parent command name.
      Returns:
      The name of parent command.
    • getSubCommands

      List<SubCommand> getSubCommands()
      Get available sub-commands.
      Returns:
      The list of all sub-commands.
    • addSubCommand

      void addSubCommand(SubCommand subCommand)
      Add a sub-command.
      Parameters:
      subCommand - The sub-command to add.
    • hasSubCommand

      boolean hasSubCommand(String name)
      Check if the sub-command exists.
      Parameters:
      name - The name (SubCommand.getSubCommandName()) of the sub-command.
      Returns:
      True if the sub-command exists, otherwise false.
    • getSubCommand

      SubCommand getSubCommand(String subCommand)
      Get a specific sub-command with its name.
      Parameters:
      subCommand - The name (SubCommand.getSubCommandName()) of the sub-command.
      Returns:
      The sub-command if exists, otherwise null.