public class SearchResultPageImpl extends AbstractSearchResultPage
SearchResultPage
interface.Modifier and Type | Field and Description |
---|---|
private SearchHit[] |
hits |
DEFAULT_HITS_PER_PAGE
Constructor and Description |
---|
SearchResultPageImpl(String searchQuery,
int totalHits,
int hitPerPage,
int pageNumber,
SearchHit[] searchHits)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
SearchHit |
getPageHit(int index)
|
int |
getPageHitCount()
This method get the number of
hits in the page represented by this
search result . |
getHitEndNumber, getHitsPerPage, getHitStartNumber, getPageCount, getPageIndex, getPagingEndIndex, getPagingStartIndex, getQuery, getTotalHitCount, iterator
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
private final SearchHit[] hits
getPageHit(int)
public SearchResultPageImpl(String searchQuery, int totalHits, int hitPerPage, int pageNumber, SearchHit[] searchHits)
searchQuery
- is the query
that caused this page.totalHits
- is the total number of hits
.hitPerPage
- is the number of hits per page
.pageNumber
- is the index
of this page.searchHits
- are the actual hits
of this page.public SearchHit getPageHit(int index)
hit
of this page
at the given
index
. index
is relative to this page
. The absolute
index of the hit
is
SearchResultPage.getPageIndex()
*SearchResultPage.getHitsPerPage()
+index
.index
- is the index of the requested hit. It has to be in the range from 0
to
SearchResultPage.getPageHitCount()
- 1
.hit
.public int getPageHitCount()
hits
in the page represented by this
search result
. The value may be less than the number of
hits per page
if this is the last
page
. The value will be greater than zero, except for the first page
that may have a page hit count
of 0
if the
search query
produced no hits.Copyright © 2001–2016 mmm-Team. All rights reserved.