Class CalendarEvent


  • public class CalendarEvent
    extends Object
    This class represents an event from a calendar. An event is represented with :
    - a title
    - a start date
    - a end date (optional)
    - a location (optional)
    • Constructor Detail

      • CalendarEvent

        public CalendarEvent()
        Creates a empty calendar event
      • CalendarEvent

        public CalendarEvent​(Date dateStart,
                             Date dateEnd,
                             String title,
                             String location)
        Creates a new calendar event
        Parameters:
        dateStart - the date when the event starts
        dateEnd - the date when the event ends
        title - the title of the event
        location - the location of the event
    • Method Detail

      • getStartDate

        public Date getStartDate()
        Get the start date of the event
        Returns:
        the start date
      • setStartDate

        public void setStartDate​(Date startDate)
        Set the start date of the event
        Parameters:
        startDate - the start date
      • getEndDate

        public Date getEndDate()
        Get the end date of the event
        Returns:
        the end date
      • setEndDate

        public void setEndDate​(Date endDate)
        Set the end date of the event to a new Date
        Parameters:
        endDate - the end date to set
      • getSubject

        public String getSubject()
        Get the subject of the event
        Returns:
        the subject of the event
      • setSubject

        public void setSubject​(String title)
        Set the title of the event
        Parameters:
        title - the title to set
      • getLocation

        public String getLocation()
        Get the location of the event
        Returns:
        the location
      • setLocation

        public void setLocation​(String location)
        Set the location of the event
        Parameters:
        location - the location to set