Class EventFilter
java.lang.Object
com.example.skeddly.business.search.EventFilter
Class that represents all the filterable options for the event search filter.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckFilterCriteria(Event event) Checks if the event meets the filter criteriaThe end t ime that has been set in the filter.Get the event categories that have been checked in the checkboxes and set in the filter.The start time that has been set in the filter.booleanisBlank()Returns true if there are not filters actually in place.booleanIf the filter is ready to be used.booleanCheck if the filter looks for events that fall on weekdays.booleanGet if the filter should look for events that fall on a weekend.voidsetEndTime(LocalTime endTime) Set the end time for the filter.voidsetFinalized(boolean finalized) Sets if the filter is ready to be used.voidsetSelectedEventTypes(ArrayList<String> selectedEventTypes) Set the event categories that have been checked in the checkboxes.voidsetStartTime(LocalTime startTime) Set the start time for the filter.voidsetWeekday(boolean weekday) Set if the filter should look for events that fall on weekdays.voidsetWeekend(boolean weekend) Set if the filter should look for events that fall on a weekend.
-
Constructor Details
-
EventFilter
-
-
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
The start time that has been set in the filter.- Returns:
- LocalTime
-
setStartTime
Set the start time for the filter.- Parameters:
startTime- StartTime
-
getEndTime
The end t ime that has been set in the filter.- Returns:
- LocalTime
-
setEndTime
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
Get the event categories that have been checked in the checkboxes and set in the filter.- Returns:
- ArrayList
-
setSelectedEventTypes
Set the event categories that have been checked in the checkboxes.- Parameters:
selectedEventTypes- ArrayList
-
checkFilterCriteria
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
-