org.rhq.core.domain.util
Class PageList<E>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<E>
              extended by org.rhq.core.domain.util.PageList<E>
All Implemented Interfaces:
Serializable, Cloneable, Iterable<E>, Collection<E>, List<E>, RandomAccess

public class PageList<E>
extends ArrayList<E>
implements Serializable

Tracks the result set for a paginated data lookup. Includes the data and the total rows that are available.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
PageList()
           
PageList(Collection<? extends E> collection, int totalSize, PageControl pageControl)
           
PageList(Collection<? extends E> collection, PageControl pageControl)
           
PageList(PageControl pageControl)
           
 
Method Summary
 PageControl getPageControl()
           
 int getTotalSize()
          Returns the total size of the "master list" that this page is a subset of.
 ArrayList<E> getValues()
           
 boolean isUnbounded()
           
 void setPageControl(PageControl pageControl)
           
 void setTotalSize(int totalSize)
          Sets the total size of the "master list" that this page is a subset of.
 void setUnbounded(boolean isUnbounded)
           
 void setValues(ArrayList<E> values)
           
 String toString()
           
 
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
 
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

PageList

public PageList()

PageList

public PageList(PageControl pageControl)

PageList

public PageList(Collection<? extends E> collection,
                PageControl pageControl)

PageList

public PageList(Collection<? extends E> collection,
                int totalSize,
                PageControl pageControl)
Method Detail

getPageControl

public PageControl getPageControl()

setPageControl

public void setPageControl(PageControl pageControl)

getValues

public ArrayList<E> getValues()

setValues

public void setValues(ArrayList<E> values)

getTotalSize

public int getTotalSize()
Returns the total size of the "master list" that this page is a subset of.

Returns:
Value of property listSize.

setTotalSize

public void setTotalSize(int totalSize)
Sets the total size of the "master list" that this page is a subset of.

Parameters:
totalSize - New value of property totalSize.

isUnbounded

public boolean isUnbounded()

setUnbounded

public void setUnbounded(boolean isUnbounded)

toString

public String toString()
Overrides:
toString in class AbstractCollection<E>


Copyright © 2008-2009 RHQ Project Advisory Board (Red Hat, Inc.). All Rights Reserved.