public abstract class SearchResult extends AbstractList<SearchHit> implements Serializable
Modifier and Type | Field and Description |
---|---|
protected Map<String,Object> |
mMetaInfoHolder
holds all the meta info
|
protected List<SearchHit> |
mSearchHits
the search hits
|
modCount
Modifier | Constructor and Description |
---|---|
protected |
SearchResult()
Creates a
SearchResult . |
Modifier and Type | Method and Description |
---|---|
SearchHit |
get(int pIndex)
Returns the search hit at the given index.
|
Object |
getMetaInfo(String pMetaName)
Returns the specified meta-element.
|
Set<String> |
getMetaKeys()
Returns the names of all the meta-elements in this search result.
|
String[] |
getMetaNames()
Deprecated.
use getMetaKeys instead.
|
Collection<SearchHit> |
getSearchHits()
Returns all the search hits in this search result.
|
protected void |
registerMetaInfo(Map<String,Object> pMetaInfo)
Registers meta info to the search.
|
protected void |
registerMetaInfo(String pMetaName,
Object pMetaElement)
Registers meta info to the search.
|
protected void |
setSearchHits(Collection<? extends SearchHit> pSearchHits)
Sets a collection that contains all the search hits.
|
int |
size() |
String |
toString() |
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
parallelStream, removeIf, stream
protected SearchResult()
SearchResult
.
NOTE: This constructor is for use by the search API.
Client code should not create SearchResult
s.protected final void registerMetaInfo(String pMetaName, Object pMetaElement)
pMetaName
- name of the meta elementpMetaElement
- the meta elementprotected final void registerMetaInfo(Map<String,Object> pMetaInfo)
pMetaInfo
- the meta info map to register.public Object getMetaInfo(String pMetaName)
pMetaName
- The name of the required meta-elementpublic String[] getMetaNames()
public Set<String> getMetaKeys()
String
.protected final void setSearchHits(Collection<? extends SearchHit> pSearchHits)
pSearchHits
- the collection that contains all the searchHitspublic Collection<SearchHit> getSearchHits()
SearchHit
.SearchHit
public SearchHit get(int pIndex)
public int size()
size
in interface Collection<SearchHit>
size
in interface List<SearchHit>
size
in class AbstractCollection<SearchHit>
public String toString()
toString
in class AbstractCollection<SearchHit>
© 1998- 2018 Stibo DX