Class BestQueryStorer


  • public class BestQueryStorer
    extends BestQuery
    Stores each query added.
    Author:
    Andrew Varley
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.Set<Query> queries  
    • Constructor Summary

      Constructors 
      Constructor Description
      BestQueryStorer()
      Constructs a BestQueryStorer
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(java.lang.String q)
      Allows a Query to be added to this tracker.
      void add​(Query q)
      Allows a Query to be added to this tracker.
      Query getBestQuery()
      Gets the best Query found so far
      java.lang.String getBestQueryString()
      Gets the best query String found so far
      java.util.Set<Query> getQueries()
      Gets the set of queries added to this object
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • queries

        protected java.util.Set<Query> queries
    • Constructor Detail

      • BestQueryStorer

        public BestQueryStorer()
        Constructs a BestQueryStorer
    • Method Detail

      • add

        public void add​(Query q)
        Allows a Query to be added to this tracker.
        Specified by:
        add in class BestQuery
        Parameters:
        q - a Query to be added to the tracker
      • add

        public void add​(java.lang.String q)
        Allows a Query to be added to this tracker.
        Specified by:
        add in class BestQuery
        Parameters:
        q - a query String to be added to the tracker
      • getQueries

        public java.util.Set<Query> getQueries()
        Gets the set of queries added to this object
        Returns:
        the set of queries
      • getBestQuery

        public Query getBestQuery()
        Gets the best Query found so far
        Specified by:
        getBestQuery in class BestQuery
        Returns:
        the best Query, or null if no Queries added to this object
      • getBestQueryString

        public java.lang.String getBestQueryString()
        Gets the best query String found so far
        Specified by:
        getBestQueryString in class BestQuery
        Returns:
        the best Query, or null if no Queries added to this object