public class ResultPageImpl extends Object implements ResultPage
Modifier and Type | Field and Description |
---|---|
static org.apache.log4j.Category |
LOGGER |
Constructor and Description |
---|
ResultPageImpl() |
ResultPageImpl(SearchResult pSearchResult,
String pBaseUrl,
String pRedirectUrl,
int pPageLength,
int pPageNumber) |
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
Object element) |
boolean |
add(Object o) |
boolean |
addAll(Collection c) |
boolean |
addAll(int index,
Collection c) |
void |
clear() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection c) |
boolean |
equals(Object o) |
Object |
get(int index) |
int |
getFromHits()
Returns the index of the first result on this page.
|
boolean |
getNext()
Returns
true if there is a next page. |
String |
getNextUrl()
Returns the URL of the next page.
|
int |
getNumberOfPages()
Returns the total number of pages.
|
Object |
getPageInfo(String pInfoKey)
Returns the extra page info of the specified key
|
Set |
getPageInfoKeys()
Returns a set of strings to get the extra information to the page.
|
int |
getPageLength()
Returns the length of this page.
|
int |
getPageNumber()
Returns the number of the current page.
|
boolean |
getPrevious()
Returns
true if there is a previous page. |
String |
getPreviousUrl()
Returns the URL of the previous page.
|
int |
getSize()
Convenience method; the number of elements in
this list.
|
int |
getToHits()
Returns the index of the last result on this page.
|
int |
getTotalHits()
Returns the total number of results on the page.
|
String |
getUrl(int pPageNumber)
Returns the url of the given page.
|
int |
hashCode() |
int |
indexOf(Object o) |
void |
initBaseUrl(String baseUrl) |
void |
initPageInfo(SearchResult pSearchResult) |
void |
initPageLength(int pageLength) |
void |
initPageNumber(int pageNumber) |
protected void |
initSearchResult(SearchResult pSearchResult,
int pFromHits,
int pToHits) |
void |
initTotalNumberOfHits(int totalNumberOfHits) |
boolean |
isEmpty() |
Iterator |
iterator() |
int |
lastIndexOf(Object o) |
ListIterator |
listIterator() |
ListIterator |
listIterator(int index) |
Object |
remove(int index) |
boolean |
remove(Object o) |
boolean |
removeAll(Collection c) |
boolean |
retainAll(Collection c) |
Object |
set(int index,
Object element) |
int |
size() |
List |
subList(int fromIndex,
int toIndex) |
Object[] |
toArray() |
Object[] |
toArray(Object[] a) |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
replaceAll, sort, spliterator
parallelStream, removeIf, stream
public ResultPageImpl()
public ResultPageImpl(SearchResult pSearchResult, String pBaseUrl, String pRedirectUrl, int pPageLength, int pPageNumber)
protected void initSearchResult(SearchResult pSearchResult, int pFromHits, int pToHits)
public void initPageInfo(SearchResult pSearchResult)
public void initBaseUrl(String baseUrl)
public void initPageLength(int pageLength)
public void initPageNumber(int pageNumber)
public void initTotalNumberOfHits(int totalNumberOfHits)
public int getSize()
ResultPage
Convenience method; the number of elements in this list. If this list contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.
The implementations of this method should delegate all it's calls to
List.size()
, and return the value returned by that method call.
getSize
in interface ResultPage
List.size()
public int getFromHits()
ResultPage
getFromHits
in interface ResultPage
public int getToHits()
ResultPage
getToHits
in interface ResultPage
public int getTotalHits()
ResultPage
getTotalHits
in interface ResultPage
public int getPageLength()
ResultPage
ResultPage.getSize()
to get the actual size
of this page.getPageLength
in interface ResultPage
public int getPageNumber()
ResultPage
getPageNumber
in interface ResultPage
public int getNumberOfPages()
ResultPage
getNumberOfPages
in interface ResultPage
public String getUrl(int pPageNumber)
ResultPage
getUrl
in interface ResultPage
pPageNumber
- the page you want to have the url for.ResultPage.getNumberOfPages()
is given, the url for the last page is
returnedpublic String getPreviousUrl()
ResultPage
getPreviousUrl
in interface ResultPage
public boolean getPrevious()
ResultPage
true
if there is a previous page.getPrevious
in interface ResultPage
true
if we have a previous page, false
otherwise.public String getNextUrl()
ResultPage
getNextUrl
in interface ResultPage
public boolean getNext()
ResultPage
true
if there is a next page.getNext
in interface ResultPage
true
if we have a next page, false
otherwise.public Set getPageInfoKeys()
ResultPage
getPageInfoKeys
in interface ResultPage
public Object getPageInfo(String pInfoKey)
ResultPage
getPageInfo
in interface ResultPage
pInfoKey
- the key used to get the extra informationpublic int size()
size
in interface Collection
size
in interface List
public boolean isEmpty()
isEmpty
in interface Collection
isEmpty
in interface List
public boolean contains(Object o)
contains
in interface Collection
contains
in interface List
public Iterator iterator()
public Object[] toArray()
toArray
in interface Collection
toArray
in interface List
public Object[] toArray(Object[] a)
toArray
in interface Collection
toArray
in interface List
public boolean add(Object o)
add
in interface Collection
add
in interface List
public boolean remove(Object o)
remove
in interface Collection
remove
in interface List
public boolean containsAll(Collection c)
containsAll
in interface Collection
containsAll
in interface List
public boolean addAll(Collection c)
addAll
in interface Collection
addAll
in interface List
public boolean addAll(int index, Collection c)
public boolean removeAll(Collection c)
removeAll
in interface Collection
removeAll
in interface List
public boolean retainAll(Collection c)
retainAll
in interface Collection
retainAll
in interface List
public void clear()
clear
in interface Collection
clear
in interface List
public boolean equals(Object o)
public int hashCode()
public int lastIndexOf(Object o)
lastIndexOf
in interface List
public ListIterator listIterator()
listIterator
in interface List
public ListIterator listIterator(int index)
listIterator
in interface List
© 1998- 2021 Escenic AS