Class Event

java.lang.Object
theLocalLoop.Event

public class Event extends Object
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.
  • 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

      public String getName()
      Getter for the name of the event.
      Returns:
      String representing the name of the event.
    • getDate

      public LocalDate getDate()
      Getter for the date of the event.
      Returns:
      LocalDate object representing the date of the event.
    • getTime

      public LocalTime 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

      public ArrayList<Constants.ValidType> getTypes()
      Getter for the type(s) of the event.
      Returns:
      ArrayList of ValidTypes representing the type(s) of the event
    • getFormat

      public Constants.ValidFormat getFormat()
      Getter for the format of the event.
      Returns:
      ValidFormat representing the format of the event
    • getOrganizer

      public String getOrganizer()
      Getter for the organizer(s) of the event.
      Returns:
      String representing the organizer(s) of the event.
    • getPassword

      public String getPassword()
      Getter for the password for editing the event.
      Returns:
      String representing the password for editing the event (If applicable).
    • getLocation

      public String getLocation()
      Getter for the location of the event.
      Returns:
      String representing the location of the event.
    • setName

      public void setName(String newName)
      Setter for the name of the event.
      Parameters:
      newName - String representing the new name of the event.
    • setDate

      public void setDate(LocalDate newDate)
      Setter for the date of the event.
      Parameters:
      newDate - LocalDate object representing the new date of the event.
    • setTime

      public void setTime(LocalTime newTime)
      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

      public void setTypes(ArrayList<Constants.ValidType> newTypes)
      Setter for the type(s) of the event.
      Parameters:
      newTypes - ArrayList of ValidTypes representing the new type(s) of the event
    • setFormat

      public void setFormat(Constants.ValidFormat newFormat)
      Setter for the format of the event.
      Parameters:
      newFormat - ValidFormat representing the new format of the event
    • setOrganizer

      public void setOrganizer(String newOrganizer)
      Setter for the organizer(s) of the event.
      Parameters:
      newOrganizer - String representing the new organizer(s) of the event.
    • setPassword

      public void setPassword(String newPassword)
      Setter for the password for editing the event.
      Parameters:
      newPassword - String representing the new password for editing the event.
    • setLocation

      public void setLocation(String newLocation)
      Setter for the location of the event.
      Parameters:
      newLocation - String representing the new location of the event.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toSummaryString

      public String 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

      public boolean equals(Object obj)
      Overrides:
      equals in class Object