Class SetListSearch


  • public class SetListSearch
    extends Object
    This is a very simple "search engine" used to search for text parts in a SetList. It searches for suite titles as well as visible comments. The algorithm used is pretty simple, and it remains to be seen whether it is fast enough even for larger setlists or if some kind of more efficient way to search has to be introduced here.
    Author:
    Rene Schneider - initial API and implementation
    • Constructor Detail

      • SetListSearch

        public SetListSearch​(SetList aSetList)
        Creates a new instance. This causes an indexing process over the SetListEntry tree.
        Parameters:
        aSetList - the setlist to index
    • Method Detail

      • createIndex

        protected void createIndex​(SetListEntry anEntry,
                                   SetList aSetList)
        Creates an index over the given entry from the given setlist. Called recursively to traverse the whole tree.
        Parameters:
        anEntry - the entry to look at
        aSetList - the setlist where the entry came from
      • findEntries

        public List<SetListEntry> findEntries​(String aQuery)
        Finds matching entries for the given query.
        Parameters:
        aQuery - the string to search for
        Returns:
        matching entries (returns an empty list if no matches were found)
      • findUnsuccessfulEntries

        public List<SetListEntry> findUnsuccessfulEntries()
        Finds entries which are considered "unsuccessful" (failed tests, tests with exceptions etc.).
        Returns:
        matching entries (returns an empty list if no matches were found)