Class EventFilter

java.lang.Object
com.example.skeddly.business.search.EventFilter

public class EventFilter extends Object
Class that represents all the filterable options for the event search filter.
  • Constructor Details

    • EventFilter

      public EventFilter(User user)
  • Method Details

    • isFinalized

      public boolean isFinalized()
      If the filter is ready to be used.
      Returns:
      boolean
    • setFinalized

      public void setFinalized(boolean finalized)
      Sets if the filter is ready to be used.
      Parameters:
      finalized - boolean
    • getStartTime

      public LocalTime getStartTime()
      The start time that has been set in the filter.
      Returns:
      LocalTime
    • setStartTime

      public void setStartTime(LocalTime startTime)
      Set the start time for the filter.
      Parameters:
      startTime - StartTime
    • getEndTime

      public LocalTime getEndTime()
      The end t ime that has been set in the filter.
      Returns:
      LocalTime
    • setEndTime

      public void setEndTime(LocalTime endTime)
      Set the end time for the filter.
      Parameters:
      endTime - LocalTime
    • isWeekend

      public boolean isWeekend()
      Get if the filter should look for events that fall on a weekend.
      Returns:
      boolean
    • setWeekend

      public void setWeekend(boolean weekend)
      Set if the filter should look for events that fall on a weekend.
      Parameters:
      weekend - boolean
    • isWeekday

      public boolean isWeekday()
      Check if the filter looks for events that fall on weekdays.
      Returns:
      boolean
    • setWeekday

      public void setWeekday(boolean weekday)
      Set if the filter should look for events that fall on weekdays.
      Parameters:
      weekday - boolean
    • getSelectedEventTypes

      public ArrayList<String> getSelectedEventTypes()
      Get the event categories that have been checked in the checkboxes and set in the filter.
      Returns:
      ArrayList
    • setSelectedEventTypes

      public void setSelectedEventTypes(ArrayList<String> selectedEventTypes)
      Set the event categories that have been checked in the checkboxes.
      Parameters:
      selectedEventTypes - ArrayList
    • checkFilterCriteria

      public boolean checkFilterCriteria(Event event)
      Checks if the event meets the filter criteria
      Parameters:
      event - Event
      Returns:
      boolean
    • isBlank

      public boolean isBlank()
      Returns true if there are not filters actually in place.
      Returns:
      boolean