|
||||||||||
| 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.ItemResult<T>
T - Item type.public final class ItemResult<T>
Result representing a single item.
| Method Summary | ||
|---|---|---|
static
|
empty()
Returns the empty item. |
|
boolean |
equals(Object obj)
|
|
static
|
found(int totalHits,
float maxScore,
long time,
T item)
Returns a found item. |
|
T |
getItem()
Returns the item. |
|
int |
hashCode()
|
|
boolean |
isFound()
Returns whether the item was found. |
|
static
|
notFound(long time)
Returns a not found item. |
|
| 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> ItemResult<T> empty()
public static <T> ItemResult<T> notFound(long time)
time - Time taken by the query (ms).
public static <T> ItemResult<T> found(int totalHits,
float maxScore,
long time,
T item)
totalHits - Number of hits.maxScore - Maximum score.time - Time taken by the query (ms).item - Found item.public boolean isFound()
public T getItem()
IllegalStateException - if the item was not found.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 | |||||||||