Class BatchSearchResult
- java.lang.Object
-
- org.hansken.plugin.extraction.api.BatchSearchResult
-
- All Implemented Interfaces:
SearchResult
public class BatchSearchResult extends Object implements SearchResult
ABatchSearchResult
is aSearchResult
implementation that stores all found traces using a single setTraces call.
-
-
Constructor Summary
Constructors Constructor Description BatchSearchResult(long totalResults)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getTotalHits()
Returns the total number of traces matching the query.Stream<SearchTrace>
getTraces()
Returns all found traces.void
setTraces(SearchTrace[] traces)
Sets all traces that can be returned by calling getTraces.
-
-
-
Method Detail
-
getTraces
public Stream<SearchTrace> getTraces()
Description copied from interface:SearchResult
Returns all found traces.- Specified by:
getTraces
in interfaceSearchResult
- 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 interfaceSearchResult
- Returns:
- total number of matching traces
-
-