Package amadeus.workspace
Class ToDo
java.lang.Object
amadeus.workspace.Task
amadeus.workspace.ToDo
Represents a simple task with no specific date or time constraints.
This class extends the Task class and provides functionality specific to ToDo tasks.
-
Constructor Details
-
ToDo
Constructs aToDotask with a given name or description.- Parameters:
name- the name or description of the task; must not benull.
-
ToDo
Constructs aToDotask with a given name and completion status.- Parameters:
name- the name or description of the task; must not benull.done- a boolean indicating whether the task is completed (true) or not (false).
-
-
Method Details
-
toFileFormat
Converts theToDotask to a file-friendly format.The format is:
T | <isDone> | <description>.- Specified by:
toFileFormatin classTask- Returns:
- a string representation of the
ToDotask in a format suitable for saving to a file.
-
getDetails
Returns the details of theToDotask.Since
ToDotasks have no additional details, this method returns an empty string.- Specified by:
getDetailsin classTask- Returns:
- an empty string.
-