Class BatchSearchResult
- java.lang.Object
-
- org.hansken.plugin.extraction.api.BatchSearchResult
-
- All Implemented Interfaces:
SearchResult
public class BatchSearchResult extends Object implements SearchResult
ABatchSearchResultis aSearchResultimplementation 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 longgetTotalHits()Returns the total number of traces matching the query.Stream<SearchTrace>getTraces()Returns all found traces.voidsetTraces(SearchTrace[] traces)Sets all traces that can be returned by calling getTraces.
-
-
-
Method Detail
-
getTraces
public Stream<SearchTrace> getTraces()
Description copied from interface:SearchResultReturns all found traces.- Specified by:
getTracesin 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:SearchResultReturns the total number of traces matching the query.- Specified by:
getTotalHitsin interfaceSearchResult- Returns:
- total number of matching traces
-
-