org.opencms.search
Class CmsSearchResultList

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<CmsSearchResult>
              extended by org.opencms.search.CmsSearchResultList
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<CmsSearchResult>, java.util.Collection<CmsSearchResult>, java.util.List<CmsSearchResult>, java.util.RandomAccess

public class CmsSearchResultList
extends java.util.ArrayList<CmsSearchResult>

A search result object returned as result of a search in CmsSearchIndex.

Since:
6.0.0
Version:
$Revision: 1.11 $
Author:
Alexander Kandzior
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
CmsSearchResultList()
          Creates 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
 java.util.Map<java.lang.String,java.lang.Integer> getCategories()
          Returns the (otional) categories found in the last the search, or null if the category list was not requested in the search.
 int getHitCount()
          Returns the hit count of all results found in the last search.
 void setCategories(java.util.Map<java.lang.String,java.lang.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, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

Constructor Detail

CmsSearchResultList

public CmsSearchResultList()
Creates a new result list with a default initial capacity of 100.


CmsSearchResultList

public CmsSearchResultList(int initialCapacity)
Creates a new result list with the specified initial capacity.

Parameters:
initialCapacity - the initial capacity
Method Detail

getCategories

public java.util.Map<java.lang.String,java.lang.Integer> getCategories()
Returns the (otional) categories found in the last the search, or null if the category list was not requested in the search.

Returns:
the (otional) categories found in the last the search
See Also:
CmsSearch.getCalculateCategories()

getHitCount

public int 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

public void setCategories(java.util.Map<java.lang.String,java.lang.Integer> categories)
Sets the categories found in the last the search.

Parameters:
categories - the categories to set
See Also:
CmsSearch.setCalculateCategories(boolean)

setHitCount

public void setHitCount(int hitCount)
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