Class EventSearch

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

public class EventSearch extends Object
This class contains logic for searching events.
  • 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 application
      newSearchBar - The search bar to use
      eventList - The list of events to search
  • Method Details

    • setOnSearchFinishedListener

      public void setOnSearchFinishedListener(SearchFinishedListener callback)
      Allows for external objects to listen for when a search query is submitted.
      Parameters:
      callback -
    • checkNameSuggestionMatch

      public boolean checkNameSuggestionMatch(String name, String query)
      Determin if query and an event name are a close enough match using LevenshteinDistance.
      Parameters:
      name - The name of the event.
      query - The query to compare.
      Returns:
      True if they are a close enough match, false otherwise.