Package amadeus.cognition
Class Command
java.lang.Object
amadeus.cognition.Command
- Direct Known Subclasses:
ByeCommand,CheckCommand,CommandList,DeadlineCommand,DeleteCommand,EventCommand,FindCommand,ListCommand,MarkCommand,ResetCommand,ToDoCommand
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Command
public Command()
-
-
Method Details
-
execute
Executes the command.This method must be implemented by subclasses to perform the specific action associated with the command.
- Throws:
AmadeusException- if an error occurs during execution.
-
isBye
public boolean isBye()Checks if the command is a termination command (e.g.,bye).This method can be overridden by subclasses to indicate that the command should terminate the application.
- Returns:
trueif the command is a termination command,falseotherwise.
-