Class SearchResults

  • All Implemented Interfaces:
    java.lang.Iterable<SearchResult>

    public final class SearchResults
    extends java.lang.Object
    implements java.lang.Iterable<SearchResult>
    A wrapper around the search results that may additionally have suggestions for an alternative search string.
    Since:
    0.6.5
    Version:
    4.0
    Author:
    Evren Sirin, Hector Perez-Urbina
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getOffset()
      Returns the offset for this slice of results.
      java.lang.String getSearchString()
      Returns the search string that was used to create this result.
      CloseableIterator<SearchResult> iterator()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Constructor Detail

      • SearchResults

        public SearchResults​(java.lang.String searchString,
                             CloseableIterator<SearchResult> results,
                             java.util.List<java.lang.String> suggestions,
                             int offset)
    • Method Detail

      • getOffset

        public int getOffset()
        Returns the offset for this slice of results.
      • getSearchString

        public java.lang.String getSearchString()
        Returns the search string that was used to create this result.