|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.conquiris.api.search.Result
net.conquiris.api.search.PageResult<T>
public final class PageResult<T>
Result representing a page of search results. Results are 0-indexed.
| Method Summary | ||
|---|---|---|
static
|
empty()
Returns the empty page. |
|
boolean |
equals(Object obj)
|
|
static
|
found(int totalHits,
float maxScore,
long time,
int firstResult,
List<T> items)
Constructor. |
|
T |
get(int index)
Return the element in the requested index (relative to the page). |
|
int |
getFirstRequestedResult()
Returns the first requested result index. |
|
int |
getFirstResult()
Returns the first result index. |
|
List<T> |
getItems()
Returns the items in the page (never null. |
|
int |
getLastResult()
|
|
int |
hashCode()
|
|
boolean |
isEmpty()
Returns whether the result is empty. |
|
Iterator<T> |
iterator()
|
|
static
|
notFound(int totalHits,
float maxScore,
long time,
int firstResult)
Returns a page with no results. |
|
static
|
notFound(long time,
int firstResult)
Returns a page with no results in a query with no results. |
|
int |
size()
Returns the number of elements in the page. |
|
| Methods inherited from class net.conquiris.api.search.Result |
|---|
getMaxScore, getTime, getTotalHits |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <T> PageResult<T> empty()
T - Item type.
public static <T> PageResult<T> notFound(int totalHits,
float maxScore,
long time,
int firstResult)
totalHits - Number of hits.maxScore - Maximum score.time - Time taken by the query (ms).firstResult - First requested result index.
public static <T> PageResult<T> notFound(long time,
int firstResult)
time - Time taken by the query (ms).firstResult - First requested result index.
public static <T> PageResult<T> found(int totalHits,
float maxScore,
long time,
int firstResult,
List<T> items)
totalHits - Number of hits.maxScore - Maximum score.time - Time taken by the query (ms).firstResult - First result index.items - Found items.public int getFirstRequestedResult()
public int getFirstResult()
IllegalStateException - if the result is empty.public int getLastResult()
public boolean isEmpty()
public int size()
public List<T> getItems()
null.
public T get(int index)
IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= size())public Iterator<T> iterator()
iterator in interface Iterable<T>public boolean equals(Object obj)
equals in class Resultpublic int hashCode()
hashCode in class Result
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||