Class BatchSearchResult

java.lang.Object
org.hansken.plugin.extraction.api.BatchSearchResult
All Implemented Interfaces:
SearchResult

public class BatchSearchResult extends Object implements SearchResult
A BatchSearchResult is a SearchResult implementation that stores all found traces using a single setTraces call.
  • Constructor Details

    • BatchSearchResult

      public BatchSearchResult(long totalResults)
  • Method Details

    • getTraces

      public Stream<SearchTrace> getTraces()
      Description copied from interface: SearchResult
      Returns all found traces.
      Specified by:
      getTraces in interface SearchResult
      Returns:
      found traces.
    • setTraces

      public void setTraces(SearchTrace[] traces)
      Sets all traces that can be returned by calling getTraces.
      Parameters:
      traces - an array of ImmutableTraces.
    • getTotalHits

      public long getTotalHits()
      Description copied from interface: SearchResult
      Returns the total number of traces matching the query.
      Specified by:
      getTotalHits in interface SearchResult
      Returns:
      total number of matching traces