Package amadeus.workspace
Class Event
java.lang.Object
amadeus.workspace.Task
amadeus.workspace.Event
Represents a scheduled event task with a start and end time.
This class extends the Task class and provides functionality specific to event tasks.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the details of theEventtask, including the start and end times.getFrom()Returns the start date/time of the event.Converts theEventtask to a file-friendly format.toString()Returns a string representation of theEvent, including its name, start time, and end time.Methods inherited from class amadeus.workspace.Task
getDone, getName, printTask, updateDone
-
Field Details
-
from
The start date/time of the event. -
to
The end date/time of the event.
-
-
Constructor Details
-
Event
Constructs anEventtask with a name, start time, and end time.- Parameters:
name- the name or description of the event; must not benull.from- the start date/time of the event; must not benull.to- the end date/time of the event; must not benull.
-
Event
Constructs anEventtask with a name, completion status, start time, and end time.- Parameters:
name- the name or description of the event; must not benull.done- a boolean indicating whether the task is completed (true) or not (false).from- the start date/time of the event; must not benull.to- the end date/time of the event; must not benull.
-
-
Method Details
-
getFrom
Returns the start date/time of the event.- Returns:
- The start date/time of the event.
-
getDetails
Returns the details of theEventtask, including the start and end times.- Specified by:
getDetailsin classTask- Returns:
- the details of the event as a formatted string.
-
toString
Returns a string representation of theEvent, including its name, start time, and end time. -
toFileFormat
Converts theEventtask to a file-friendly format.The format is:
E | <isDone> | <description> | <from> | <to>.- Specified by:
toFileFormatin classTask- Returns:
- a string representation of the
Eventtask in a format suitable for saving to a file.
-