Package org.opencms.search
Class CmsSearchResultList
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<CmsSearchResult>
,Collection<CmsSearchResult>
,List<CmsSearchResult>
,RandomAccess
A search result object returned as result of a search in
CmsSearchIndex
.- Since:
- 6.0.0
- See Also:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
ConstructorDescriptionCreates a new result list with a default initial capacity of 100.CmsSearchResultList
(int initialCapacity) Creates a new result list with the specified initial capacity. -
Method Summary
Modifier and TypeMethodDescriptionReturns the (otional) categories found in the last the search, ornull
if the category list was not requested in the search.int
Returns the hit count of all results found in the last search.void
setCategories
(Map<String, Integer> categories) Sets the categories found in the last the search.void
setHitCount
(int hitCount) Sets the hit count of all results found in the last search.Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
Methods inherited from class java.util.AbstractCollection
containsAll, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, stream, toArray
Methods inherited from interface java.util.List
containsAll
-
Constructor Details
-
CmsSearchResultList
public CmsSearchResultList()Creates a new result list with a default initial capacity of 100. -
CmsSearchResultList
Creates a new result list with the specified initial capacity.- Parameters:
initialCapacity
- the initial capacity
-
-
Method Details
-
getCategories
Returns the (otional) categories found in the last the search, ornull
if the category list was not requested in the search.- Returns:
- the (otional) categories found in the last the search
- See Also:
-
getHitCount
Returns the hit count of all results found in the last search.Since this list will only contain the result objects for the current display page, the size of the list is usually much less then the hit count of all results found.
- Returns:
- the hit count of all results found in the last search
-
setCategories
Sets the categories found in the last the search.- Parameters:
categories
- the categories to set- See Also:
-
setHitCount
Sets the hit count of all results found in the last search.Since this list will only contain the result objects for the current display page, the size of the list is usually much less then the hit count of all results found.
- Parameters:
hitCount
- the hit count to set
-