Class SearchResponseSupport
java.lang.Object
org.apache.maven.search.api.support.SearchResponseSupport
- All Implemented Interfaces:
SearchResponse
A search response support class.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSearchResponseSupport(SearchRequest searchRequest, int totalHits, List<Record> page) -
Method Summary
Modifier and TypeMethodDescriptionintReturns the count of current hits in current "page".getPage()Returns current "page" of results as list of records, nevernull.Returns theSearchRequestused for this response, nevernull.intReturns the total count of hits produced bySearchResponse.getSearchRequest().toString()
-
Field Details
-
searchRequest
-
totalHits
protected final int totalHits -
page
-
-
Constructor Details
-
SearchResponseSupport
-
-
Method Details
-
getSearchRequest
Description copied from interface:SearchResponseReturns theSearchRequestused for this response, nevernull.- Specified by:
getSearchRequestin interfaceSearchResponse
-
getTotalHits
public int getTotalHits()Description copied from interface:SearchResponseReturns the total count of hits produced bySearchResponse.getSearchRequest().- Specified by:
getTotalHitsin interfaceSearchResponse
-
getCurrentHits
public int getCurrentHits()Description copied from interface:SearchResponseReturns the count of current hits in current "page". It may be less or equal to page size ofSearchRequest.getPaging().- Specified by:
getCurrentHitsin interfaceSearchResponse
-
getPage
Description copied from interface:SearchResponseReturns current "page" of results as list of records, nevernull.- Specified by:
getPagein interfaceSearchResponse
-
toString
-