Class SetListSearch


  • public class SetListSearch
    extends java.lang.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 Summary

      Constructors 
      Constructor Description
      SetListSearch​(SetList aSetList)
      Creates a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void createIndex​(SetListEntry anEntry, SetList aSetList)
      Creates an index over the given entry from the given setlist.
      java.util.List<SetListEntry> findEntries​(java.lang.String aQuery)
      Finds matching entries for the given query.
      java.util.List<SetListEntry> findUnsuccessfulEntries()
      Finds entries which are considered "unsuccessful" (failed tests, tests with exceptions etc.).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 java.util.List<SetListEntry> findEntries​(java.lang.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 java.util.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)