Interface BaseCommand

All Known Implementing Classes:
AddCommand, AddIfMaxCommand, AddIfMinCommand, ClearCommand, CountGreaterThanDistanceCommand, ExecuteScriptCommand, ExitCommand, HelpCommand, InfoCommand, MinByCreationDateCommand, PrintFieldDistanceAscendingCommand, RemoveByIdCommand, RemoveGreaterCommand, RemoveSession, SaveCommand, ShowCommand, ShowSessions, UpdateCommand

public interface BaseCommand
Base interface for command implementation. You should implement it before applying command in CommandManager
Since:
1.0
Author:
Zerumi
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    execute (String[] args)
    Base method for command executing.
    default String
    Base method for show command arguments
    Base method for show command description.
    Base method for show command name
    Base method for get command Output
  • Method Details

    • getName

      String getName()
      Base method for show command name
      Returns:
      command name
    • getDescr

      String getDescr()
      Base method for show command description.
      Returns:
      command description
    • getArgs

      default String getArgs()
      Base method for show command arguments
      Returns:
      command arguments pattern
    • execute

      void execute (String[] args) throws IllegalArgumentException
      Base method for command executing.
      Parameters:
      args - full array of entered line.
      Throws:
      IllegalArgumentException - when command can't understand given arguments
    • getResponse

      CommandStatusResponse getResponse()
      Base method for get command Output
      Returns:
      Full command output
      Since:
      2.0