org.melati.util
Class CountedDumbPagedEnumeration<T>

Package class diagram package CountedDumbPagedEnumeration
java.lang.Object
  extended by org.melati.util.PagedEnumerationBase<T>
      extended by org.melati.util.CountedDumbPagedEnumeration<T>
All Implemented Interfaces:
Enumeration<T>, PagedEnumeration<T>

public class CountedDumbPagedEnumeration<T>
extends PagedEnumerationBase<T>

A PagedEnumeration which knows how big it is. Ideally SQL would allow you to start at an offset.


Constructor Summary
CountedDumbPagedEnumeration(Enumeration<T> base, int pageStart, int pageSize, int totalCount)
          Constructor.
 
Method Summary
 Integer getNextPageStart()
          
 
Methods inherited from class org.melati.util.PagedEnumerationBase
getCurrentPosition, getNextPosition, getPageEnd, getPages, getPageSize, getPageStart, getPrevPageStart, getTotalCount, hasMoreElements, nextElement, nextElementOnThisPage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CountedDumbPagedEnumeration

public CountedDumbPagedEnumeration(Enumeration<T> base,
                                   int pageStart,
                                   int pageSize,
                                   int totalCount)
Constructor.

Parameters:
base - underlying Enumeration
pageStart - index of start of page
pageSize - how many Elements to include upon a page
totalCount - size of the underlying Enumeration
Method Detail

getNextPageStart

public Integer getNextPageStart()

Returns:
the start record of the next page, indexed from 1.
See Also:
org.melati.poem.util.PagedEnumeration#getNextPageStart()


Copyright © 2000-2010 PanEris. All Rights Reserved.