Class Event
java.lang.Object
theLocalLoop.Event
Event class representing a single event in the application.
Contains attributes such as name, date, time, duration, type(s), format, organizer(s), password, and location.
Constructor initializes all attributes, with getters and setters for each.
Includes a toString method for displaying event details and a toSummaryString method for displaying a brief summary of the event.
Contains attributes such as name, date, time, duration, type(s), format, organizer(s), password, and location.
Constructor initializes all attributes, with getters and setters for each.
Includes a toString method for displaying event details and a toSummaryString method for displaying a brief summary of the event.
-
Constructor Summary
ConstructorsConstructorDescriptionEvent(String name, LocalDate date, LocalTime time, double duration, ArrayList<Constants.ValidType> types, Constants.ValidFormat format, String organizer, String password, String location) Constructor for Event class, initializes all attributes. -
Method Summary
Modifier and TypeMethodDescriptionbooleangetDate()Getter for the date of the event.doubleGetter for the duration of the event.Getter for the format of the event.Getter for the location of the event.getName()Getter for the name of the event.Getter for the organizer(s) of the event.Getter for the password for editing the event.getTime()Getter for the time of the event.getTypes()Getter for the type(s) of the event.voidSetter for the date of the event.voidsetDuration(double newDuration) Setter for the duration of the event.voidsetFormat(Constants.ValidFormat newFormat) Setter for the format of the event.voidsetLocation(String newLocation) Setter for the location of the event.voidSetter for the name of the event.voidsetOrganizer(String newOrganizer) Setter for the organizer(s) of the event.voidsetPassword(String newPassword) Setter for the password for editing the event.voidSetter for the time of the event.voidsetTypes(ArrayList<Constants.ValidType> newTypes) Setter for the type(s) of the event.toString()Returns a summary string representation of the event.
-
Constructor Details
-
Event
public Event(String name, LocalDate date, LocalTime time, double duration, ArrayList<Constants.ValidType> types, Constants.ValidFormat format, String organizer, String password, String location) Constructor for Event class, initializes all attributes.- Parameters:
name- String representing the name of the event.date- LocalDate object representing the date of the event.time- LocalTime object representing the time of the event.duration- double representing the duration of the event in hours.types- ArrayList of ValidTypes representing the type(s) of the event ("Social, Educational, Coding, ect...").format- ValidFormat representing the format of the event ("In-person", "Virtual", or "Hybrid").organizer- String representing the organizer(s) of the event.password- String representing the password for editing the event (If applicable).location- String representing the location of the event (If applicable).
-
-
Method Details
-
getName
Getter for the name of the event.- Returns:
- String representing the name of the event.
-
getDate
Getter for the date of the event.- Returns:
- LocalDate object representing the date of the event.
-
getTime
Getter for the time of the event.- Returns:
- LocalTime object representing the time of the event.
-
getDuration
public double getDuration()Getter for the duration of the event.- Returns:
- double representing the duration of the event, in hours.
-
getTypes
Getter for the type(s) of the event.- Returns:
- ArrayList of ValidTypes representing the type(s) of the event
-
getFormat
Getter for the format of the event.- Returns:
- ValidFormat representing the format of the event
-
getOrganizer
Getter for the organizer(s) of the event.- Returns:
- String representing the organizer(s) of the event.
-
getPassword
Getter for the password for editing the event.- Returns:
- String representing the password for editing the event (If applicable).
-
getLocation
Getter for the location of the event.- Returns:
- String representing the location of the event.
-
setName
Setter for the name of the event.- Parameters:
newName- String representing the new name of the event.
-
setDate
Setter for the date of the event.- Parameters:
newDate- LocalDate object representing the new date of the event.
-
setTime
Setter for the time of the event.- Parameters:
newTime- LocalTime object representing the new time of the event.
-
setDuration
public void setDuration(double newDuration) Setter for the duration of the event.- Parameters:
newDuration- double representing the new duration of the event, in hours.
-
setTypes
Setter for the type(s) of the event.- Parameters:
newTypes- ArrayList of ValidTypes representing the new type(s) of the event
-
setFormat
Setter for the format of the event.- Parameters:
newFormat- ValidFormat representing the new format of the event
-
setOrganizer
Setter for the organizer(s) of the event.- Parameters:
newOrganizer- String representing the new organizer(s) of the event.
-
setPassword
Setter for the password for editing the event.- Parameters:
newPassword- String representing the new password for editing the event.
-
setLocation
Setter for the location of the event.- Parameters:
newLocation- String representing the new location of the event.
-
toString
-
toSummaryString
Returns a summary string representation of the event.- Returns:
- String representing a summary of the event, including only the name, date, time, duration, format, organizer(s), and location.
-
equals
-