Package amadeus.cognition
Class CheckCommand
java.lang.Object
amadeus.cognition.Command
amadeus.cognition.CheckCommand
Command to filter tasks based on a date or date range.
This command parses the user input to identify a date or date range (e.g., "before", "after", or exact date) and filters tasks that match the specified condition.
-
Constructor Summary
ConstructorsConstructorDescriptionCheckCommand(String argument) Constructs a newCheckCommandby parsing the user input for the date or date range. -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()Executes the command by displaying the filtered tasks.
-
Constructor Details
-
CheckCommand
Constructs a newCheckCommandby parsing the user input for the date or date range.The input is expected to contain a valid date or date range (e.g., "before 31/12/2025"). If the input is empty or invalid, an
AmadeusExceptionis thrown.- Parameters:
argument- the user input containing the date or date range; must not benullor empty.- Throws:
AmadeusException- if the input is empty or invalid.
-
-
Method Details
-
execute
public void execute()Executes the command by displaying the filtered tasks.If no tasks match the specified date or date range, a message is displayed to inform the user. Otherwise, the matching tasks are displayed using
Speech.sayList(java.util.ArrayList).
-