Package org.opencms.search.galleries
Class CmsGallerySearchResultList
java.lang.Object
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<CmsGallerySearchResult>,Collection<CmsGallerySearchResult>,List<CmsGallerySearchResult>,RandomAccess,SequencedCollection<CmsGallerySearchResult>
The search result list for the gallery search index.
- Since:
- 8.0.0
- See Also:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new result list with a default initial capacity of 100.CmsGallerySearchResultList(int initialCapacity) Creates a new result list with the specified initial capacity. -
Method Summary
Modifier and TypeMethodDescriptionvoidappend(CmsGallerySearchResultList moreResults) Appends the results from another search result list.voidcalculatePages(int pageIndex, int matchesPerPage) Calculates the result pages.intReturns the hit count of all results found in the last search.intReturns the total number of search result pages.intReturns the index of the current result page.voidsetHitCount(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, addFirst, addLast, clear, clone, contains, ensureCapacity, equals, forEach, get, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeIf, removeLast, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeMethods inherited from class java.util.AbstractCollection
containsAll, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, stream, toArrayMethods inherited from interface java.util.List
containsAll, reversed
-
Constructor Details
-
CmsGallerySearchResultList
public CmsGallerySearchResultList()Creates a new result list with a default initial capacity of 100. -
CmsGallerySearchResultList
Creates a new result list with the specified initial capacity.- Parameters:
initialCapacity- the initial capacity
-
-
Method Details
-
append
Appends the results from another search result list.- Parameters:
moreResults- the second search result list
-
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
-
getPageCount
Returns the total number of search result pages.- Returns:
- the total number of search result pages
- See Also:
-
getResultPage
Returns the index of the current result page.- Returns:
- the index of the current result page
- 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
-
calculatePages
Calculates the result pages.- Parameters:
pageIndex- the index of the current pagematchesPerPage- the matches per page
-