Class EventSearch
java.lang.Object
com.example.skeddly.business.search.EventSearch
This class contains logic for searching events.
-
Constructor Summary
ConstructorsConstructorDescriptionEventSearch(android.content.Context context, android.widget.SearchView newSearchBar, ArrayList<Event> eventList) Constructor for the EventSearch class. -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckNameSuggestionMatch(String name, String query) Determin if query and an event name are a close enough match usingLevenshteinDistance.voidAllows for external objects to listen for when a search query is submitted.
-
Constructor Details
-
EventSearch
public EventSearch(android.content.Context context, android.widget.SearchView newSearchBar, ArrayList<Event> eventList) Constructor for the EventSearch class.- Parameters:
context- The context of the applicationnewSearchBar- The search bar to useeventList- The list of events to search
-
-
Method Details
-
setOnSearchFinishedListener
Allows for external objects to listen for when a search query is submitted.- Parameters:
callback-
-
checkNameSuggestionMatch
Determin if query and an event name are a close enough match usingLevenshteinDistance.- Parameters:
name- The name of the event.query- The query to compare.- Returns:
- True if they are a close enough match, false otherwise.
-